removes a bug in SAM v1 and v2 (introduced when merging with v3)

This commit is contained in:
mkvore-commit
2009-09-07 17:33:29 +00:00
parent 1f1d089fda
commit 1850e893e9
4 changed files with 17 additions and 12 deletions

View File

@ -124,9 +124,11 @@ public abstract class SAMHandler implements Runnable {
* @return True if the string was successfully written, false otherwise
*/
protected final boolean writeString(String str) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Sending the client: [" + str + "]");
return writeString(str, socket);
synchronized (socketWLock) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Sending the client: [" + str + "]");
return writeString(str, socket);
}
}
public static boolean writeString(String str, SocketChannel out)