Closed SRabbelier closed 4 years ago
Hm, looks like you are right.
I vaguely remember I moved the socket creation out to a dedicated socket factory, so that users could provide their own. I must have forgotten to request a new socket from the factory once I closed the old socket.
I assume the way to go about this is keeping a reference to the socket factory that's passed to the Twirk builder, and request a socket from that one when we create resources.
Thanks for the report. I'll take a look at it.
After creating a Twirk instance, calling
connect()
,close()
,connect()
, results in:java.net.SocketException: Socket is closed
This seems to be because in the 4.0 rewrite,
createResources
no longer creates a new socket andreleaseResources
does still close the socket.