Socket socket = null;
try {
socket = new Socket(inetAddress, port);
+ socket.setSoTimeout((int) TimeUnit.MINUTES.toMillis(3));
InputStream socketInputStream = socket.getInputStream();
inputStream = new BandwidthCountingInputStream(socketInputStream, 5, TimeUnit.SECONDS);
byte[] buffer = new byte[65536];