Merge branch '1744-check-socket-is-bound' into 'master'

Check server socket is bound

Closes #1744

See merge request briar/briar!1258
This commit is contained in:
Torsten Grote
2020-07-03 14:51:05 +00:00
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;
}