I2P_ERROR Session was closed
On certain occasions the I2P router replies with:
STREAM STATUS RESULT=I2P_ERROR MESSAGE="Session was closed"
as a second line to a STREAM ACCEPT request. The second line is supposed to contain a Base64 destination of the incoming peer according to the SAM specification at https://geti2p.net/en/docs/api/samv3#Accept%20Response
If SILENT=false was passed, which is the default value, the SAM bridge sends the client a ASCII line containing the base64 public destination key of the requesting peer
In this state, it seems, the session is unusable for accepting incoming connections, but issuing NAMING LOOKUP NAME=ME on the session control socket returns NAMING REPLY RESULT=OK NAME=ME VALUE=... hinting that the session is healthy.
Either the doc should be updated to mention that STREAM STATUS may be returned instead of Base64 string or the implementation be changed to conform. If the session is closed, then also closing the control socket would be useful (by the I2P router).
This happens after a laptop has been suspended for a few hours and wakes up, probably messing some clocks inside the I2P router.
Related: https://github.com/bitcoin/bitcoin/pull/28077
I2P version: 1.9.0-0
API version: 0.9.55
Java version: Oracle Corporation 18.0.2.1 (OpenJDK Runtime Environment 18.0.2.1+1-1)
Wrapper version: none
Server version: 9.3.30.v20211001
Servlet version: Jasper JSP 2.3 Engine (3.1)
JSTL version: standard-taglib 1.2.0
Platform: Mac OS X aarch64 13.5
Processor: (armv8)
JBigI status: Native BigInteger library libjbigi-osx-armv8_64.jnilib loaded from resource
GMP version: 6.2.1
JBigI version: 4
Encoding: UTF-8
Charset: UTF-8
Built By: zlatinb