Set socket timeout to 3 minutes in the DCC receiver, too.
[xudocci.git] / src / main / java / net / pterodactylus / irc / DccReceiver.java
index ed59c69..abb018c 100644 (file)
@@ -176,6 +176,7 @@ public class DccReceiver extends AbstractExecutionThreadService {
                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];