flag as closed /after/ we send the disconnect message *cough*

This commit is contained in:
jrandom
2004-05-03 11:13:44 +00:00
committed by zzz
parent 0324bac044
commit 1b4af66986

View File

@ -447,7 +447,6 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
if (_closed) return;
if (_log.shouldLog(Log.DEBUG)) _log.debug("Destroy the session", new Exception("DestroySession()"));
_closed = true;
if (sendDisconnect) {
try {
_producer.disconnect(this);
@ -455,6 +454,7 @@ abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2CPMessa
propogateError("Error destroying the session", ipe);
}
}
_closed = true;
closeSocket();
if (_sessionListener != null) _sessionListener.disconnected(this);
}