From: David ‘Bombe’ Roden Date: Mon, 5 Aug 2013 17:51:31 +0000 (+0200) Subject: Set socket timeout to 3 minutes in the DCC receiver, too. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=2a459ba5c365804cde3f7bd67d6f5aabbaa1b1d2;p=xudocci.git Set socket timeout to 3 minutes in the DCC receiver, too. --- 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];