mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Close invitation connections after use.
This commit is contained in:
@@ -97,5 +97,7 @@ class AliceConnector extends Connector {
|
||||
Thread.currentThread().interrupt();
|
||||
return;
|
||||
}
|
||||
// That's all, folks!
|
||||
tryToClose(conn, false);
|
||||
}
|
||||
}
|
||||
@@ -97,5 +97,7 @@ class BobConnector extends Connector {
|
||||
Thread.currentThread().interrupt();
|
||||
return;
|
||||
}
|
||||
// That's all, folks!
|
||||
tryToClose(conn, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,6 +90,7 @@ abstract class Connector extends Thread {
|
||||
protected void tryToClose(DuplexTransportConnection conn,
|
||||
boolean exception) {
|
||||
try {
|
||||
if(LOG.isLoggable(INFO)) LOG.info("Closing connection");
|
||||
conn.dispose(exception, true);
|
||||
} catch(IOException e) {
|
||||
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
|
||||
|
||||
Reference in New Issue
Block a user