Compare commits

...

2 Commits

Author SHA1 Message Date
Mark Nellemann 77b7984517 Wait indefinitely on server for connections.
continuous-integration/drone/push Build is passing Details
2023-07-14 08:15:15 +02:00
Mark Nellemann 9f67f98fec Merge branch 'main' of git.data.coop:nellemann/jnetperf 2023-07-14 07:42:40 +02:00
3 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,3 @@
projectId = jnetperf
projectGroup = biz.nellemann.jnetperf
projectVersion = 0.0.6
projectVersion = 0.0.7

View File

@ -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;

View File

@ -22,7 +22,8 @@ public class TcpServer extends Thread {
log.info("TcpServer()");
socket = new ServerSocket(port);
socket.setSoTimeout(10000);
socket.setSoTimeout(0); // Wait indefinitely
}