fix warning about the Socket's InputStream not being closed

The warning is issued if we assign the stream to a variable. The stream
is getting closed together with the socket.