mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 21:29:54 +01:00
Handle exceptions thrown by connections' dispose() methods.
This commit is contained in:
@@ -88,7 +88,11 @@ class IncomingSimplexConnection {
|
|||||||
transport.dispose(false, true);
|
transport.dispose(false, true);
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
||||||
|
try {
|
||||||
transport.dispose(true, true);
|
transport.dispose(true, true);
|
||||||
|
} catch(IOException e1) {
|
||||||
|
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
connRegistry.unregisterConnection(contactId, transportId);
|
connRegistry.unregisterConnection(contactId, transportId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,10 +103,18 @@ class OutgoingSimplexConnection {
|
|||||||
transport.dispose(false);
|
transport.dispose(false);
|
||||||
} catch(DbException e) {
|
} catch(DbException e) {
|
||||||
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
||||||
|
try {
|
||||||
transport.dispose(true);
|
transport.dispose(true);
|
||||||
|
} catch(IOException e1) {
|
||||||
|
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
||||||
|
}
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
||||||
|
try {
|
||||||
transport.dispose(true);
|
transport.dispose(true);
|
||||||
|
} catch(IOException e1) {
|
||||||
|
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
connRegistry.unregisterConnection(contactId, transportId);
|
connRegistry.unregisterConnection(contactId, transportId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,10 +96,18 @@ class ConnectionDispatcherImpl implements ConnectionDispatcher {
|
|||||||
transport);
|
transport);
|
||||||
} catch(DbException e) {
|
} catch(DbException e) {
|
||||||
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
||||||
|
try {
|
||||||
transport.dispose(true, false);
|
transport.dispose(true, false);
|
||||||
|
} catch(IOException e1) {
|
||||||
|
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
||||||
|
}
|
||||||
} catch(IOException e) {
|
} catch(IOException e) {
|
||||||
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
||||||
|
try {
|
||||||
transport.dispose(true, false);
|
transport.dispose(true, false);
|
||||||
|
} catch(IOException e1) {
|
||||||
|
if(LOG.isLoggable(Level.WARNING)) LOG.warning(e.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user