fix bug - java.net.SocketException: Connection reset