I2CP: Prevent sending data message before handshake with router is complete

This commit is contained in:
zzz committed 2015-05-30 14:02:38 +00:00
1 parent 280fc05c91
commit 94824e4d2b
3 files changed
+6

No files matched your search

@@ -619,6 +619,8 @@ public abstract class I2PSessionImpl implements I2PSession, I2CPMessageReader.I2
throw new I2PSessionException("Already closed");
if (_state == State.INIT)
throw new I2PSessionException("Not open, must call connect() first");
if (_state == State.OPENING) // not before GOTDATE
throw new I2PSessionException("Session not open yet");
}
_producer.reportAbuse(this, msgId, severity);
}
@@ -252,6 +252,8 @@ class I2PSessionImpl2 extends I2PSessionImpl {
throw new I2PSessionException("Already closed");
if (_state == State.INIT)
throw new I2PSessionException("Not open, must call connect() first");
if (_state == State.OPENING || _state == State.GOTDATE) // not before GOTDATE or session
throw new I2PSessionException("Session not open yet");
}
updateActivity();
@@ -261,6 +261,8 @@ class I2PSessionMuxedImpl extends I2PSessionImpl2 {
throw new I2PSessionException("Already closed");
if (_state == State.INIT)
throw new I2PSessionException("Not open, must call connect() first");
if (_state == State.OPENING || _state == State.GOTDATE) // not before GOTDATE or session
throw new I2PSessionException("Session not open yet");
}
updateActivity();