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