Wait indefinitely on server for connections.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9f67f98fec
commit
77b7984517
|
@ -1,3 +1,3 @@
|
|||
projectId = jnetperf
|
||||
projectGroup = biz.nellemann.jnetperf
|
||||
projectVersion = 0.0.6
|
||||
projectVersion = 0.0.7
|
||||
|
|
|
@ -54,12 +54,16 @@ public class Application implements Callable<Integer> {
|
|||
|
||||
|
||||
@Override
|
||||
public Integer call() throws Exception {
|
||||
public Integer call() {
|
||||
|
||||
if(runMode.runServer) {
|
||||
runServer();
|
||||
} else if(runMode.remoteServer != null) {
|
||||
runClient(runMode.remoteServer);
|
||||
try {
|
||||
if (runMode.runServer) {
|
||||
runServer();
|
||||
} else if (runMode.remoteServer != null) {
|
||||
runClient(runMode.remoteServer);
|
||||
}
|
||||
} catch (IOException | InterruptedException e) {
|
||||
System.err.println(e.getMessage());
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -22,7 +22,8 @@ public class TcpServer extends Thread {
|
|||
log.info("TcpServer()");
|
||||
|
||||
socket = new ServerSocket(port);
|
||||
socket.setSoTimeout(10000);
|
||||
socket.setSoTimeout(0); // Wait indefinitely
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue