Test case :
A connection has been established successfully from Messenger in Proton-j, and the client is waiting (possibly with a timeout) on recv().
Then the peer resets this connection.
In MessengerImpl.processActive(), a IOException("Connection reset by peer") is raised and catched. Until now everything is fine.
A log is emitted, but the exception is not re-thrown, not registered, and the method continues to process other connections.
From the client point of view :
- if recv() has a positive timeout, a TimeoutException is raised, but the client cannot discriminate it from a timeout when nothing is received on a well established session. My client, for example, re-do a recv() , exits immediately with a TimeoutException, and then consumes 100% of the CPU of the JVM.
- if recv() is blocking (negative timeout), an infinite loop is happening inside waitUntil(), then consuming 100% of CPU.
I would suggest to throw a new RuntimeException(IOException) after having done the log in the catch clause.