From 2a459ba5c365804cde3f7bd67d6f5aabbaa1b1d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 5 Aug 2013 19:51:31 +0200 Subject: [PATCH] Set socket timeout to 3 minutes in the DCC receiver, too. --- src/main/java/net/pterodactylus/irc/DccReceiver.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/pterodactylus/irc/DccReceiver.java b/src/main/java/net/pterodactylus/irc/DccReceiver.java index ed59c69..abb018c 100644 --- a/src/main/java/net/pterodactylus/irc/DccReceiver.java +++ b/src/main/java/net/pterodactylus/irc/DccReceiver.java @@ -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]; -- 2.7.4