- Change all log errors to warns (tickets #76, #95, #120)
      - Double socket soTimeout to 2 seconds
This commit is contained in:
zzz
2011-01-16 15:31:45 +00:00
parent 0ed88c5686
commit 5a1027c5ed
4 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,10 @@
2011-01-16 zzz
* Console: Allow editing of console args
* UDP: Prevent rare startup NPE
* UPnP:
- Change all log errors to warns (tickets #76, #95, #120)
- Double socket soTimeout to 2 seconds
2011-01-15 zzz
* Console: Add some HTTP headers in the view servlets

View File

@ -18,10 +18,10 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 11;
public final static long BUILD = 12;
/** for example "-test" */
public final static String EXTRA = "";
public final static String EXTRA = "-rc";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
public static void main(String args[]) {
System.out.println("I2P Router version: " + FULL_VERSION);

View File

@ -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);
}

View File

@ -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);
}
}