Issue #19: EOFException when reading from socket