forked from I2P_Developers/i2p.i2p
* UPnP:
- Change all log errors to warns (tickets #76, #95, #120) - Double socket soTimeout to 2 seconds
This commit is contained in:
@@ -388,10 +388,10 @@ public class HTTPRequest extends HTTPPacket
|
||||
// Set the timeout to be nice and short, the device should be local and fast.
|
||||
// Yeah, the UPnP standard is a minute or something, too bad.
|
||||
// If he can't get back to us in a few seconds, forget it.
|
||||
// And set the soTimeout to 1 second (for reads).
|
||||
// And set the soTimeout to 2 second (for reads).
|
||||
//postSocket = new Socket(host, port);
|
||||
postSocket = new Socket();
|
||||
postSocket.setSoTimeout(1000);
|
||||
postSocket.setSoTimeout(2000);
|
||||
SocketAddress sa = new InetSocketAddress(host, port);
|
||||
postSocket.connect(sa, 3000);
|
||||
}
|
||||
|
||||
@@ -52,14 +52,14 @@ public final class Debug
|
||||
}
|
||||
public static final void warning(String s) {
|
||||
if (_log != null)
|
||||
_log.error(s);
|
||||
_log.warn(s);
|
||||
}
|
||||
public static final void warning(String m, Exception e) {
|
||||
if (_log != null)
|
||||
_log.error(m, e);
|
||||
_log.warn(m, e);
|
||||
}
|
||||
public static final void warning(Exception e) {
|
||||
if (_log != null)
|
||||
_log.error("", e);
|
||||
_log.warn("", e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user