Reputation: 3204
If I have a Selector
that's accepting sockets
and pushing them to a queue for other threads to handle, and no threads takes a socket for, say two minutes, and the client pushes data but then times out and disconnects. When a thread
then takes one of those now closed sockets
and tries to read from it, will it get the data that has already been sent by the client, or will there be nothing there to read?
Upvotes: 1
Views: 213
Reputation: 310884
It depends on what 'severed' means.
SocketException: socket closed
from the various read()
methods.Upvotes: 1