I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 94824e4d authored by zzz's avatar zzz
Browse files

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

parent 280fc05c
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment