This is similar to
JBAS-4525, but in ReadTask. The in.readByte() call in ReadTask won't be interrupted when the thread is interrupted. When this happened the connection.close() call in client won't return until socket timeout, 2 min by default.
Since it's blocking socket, we can't use short timeout approach applied for WriteTask.
The only way to interrupt ReadTask is to call Socket.close() or close() on InputStream underlying socket.