Check server socket is bound.

This commit is contained in:
akwizgran
2020-07-03 13:04:26 +01:00
parent 1dd15567de
commit 597fef6d50
2 changed files with 2 additions and 2 deletions

View File

@@ -349,7 +349,7 @@ class LanTcpPlugin extends TcpPlugin {
tryToClose(ss, LOG, WARNING);
}
}
if (ss == null) {
if (ss == null || !ss.isBound()) {
LOG.info("Could not bind server socket for key agreement");
return null;
}

View File

@@ -162,7 +162,7 @@ abstract class TcpPlugin implements DuplexPlugin, EventListener {
tryToClose(ss, LOG, WARNING);
}
}
if (ss == null) {
if (ss == null || !ss.isBound()) {
LOG.info("Could not bind server socket");
return;
}