Drain socket data before closing

This avoids a End of Stream error in
the Minecraft server logs.

Also, set a timeout and fix up comments