added flush to sync daemons
Former-commit-id: ddc04e046dc645f677dc182132f985708551bfc5
This commit is contained in:
parent
1f7090200a
commit
3884634590
2 changed files with 3 additions and 1 deletions
|
|
@ -55,6 +55,7 @@ public class PCDataSynchronizationClient implements HalDaemon {
|
|||
logger.warning("Protocol version do not match, skipping user. " +
|
||||
"(local v"+PCDataSynchronizationDaemon.PROTOCOL_VERSION+" != remote v"+version+")");
|
||||
out.writeObject(null); // Tell server we are disconnecting
|
||||
out.flush();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import java.util.logging.Logger;
|
|||
|
||||
public class PCDataSynchronizationDaemon extends ThreadedTCPNetworkServer implements HalDaemon {
|
||||
private static final Logger logger = LogUtil.getLogger();
|
||||
public static final int PROTOCOL_VERSION = 2;
|
||||
public static final int PROTOCOL_VERSION = 3;
|
||||
|
||||
|
||||
public PCDataSynchronizationDaemon() {
|
||||
|
|
@ -73,6 +73,7 @@ public class PCDataSynchronizationDaemon extends ThreadedTCPNetworkServer implem
|
|||
try {
|
||||
Object obj = null;
|
||||
out.writeInt(PROTOCOL_VERSION); // send our protocol version to client
|
||||
out.flush();
|
||||
while((obj = in.readObject()) != null){
|
||||
if(obj instanceof PeerDataReqDTO){
|
||||
logger.fine("Client requesting peer data");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue