do not log warning on SocketTimeoutExceptions
This commit is contained in:
@@ -20,6 +20,7 @@ import net.i2p.client.I2PClientFactory
|
||||
import net.i2p.client.I2PSession
|
||||
import net.i2p.client.streaming.I2PSocketManager
|
||||
import net.i2p.client.streaming.I2PSocketManagerFactory
|
||||
import net.i2p.client.streaming.I2PSocketOptions
|
||||
|
||||
@Log
|
||||
class Core {
|
||||
@@ -63,6 +64,8 @@ class Core {
|
||||
keyDat.withInputStream {
|
||||
socketManager = new I2PSocketManagerFactory().createManager(it, sysProps)
|
||||
}
|
||||
socketManager.getDefaultOptions().setReadTimeout(60000)
|
||||
socketManager.getDefaultOptions().setConnectTimeout(30000)
|
||||
i2pSession = socketManager.getSession()
|
||||
|
||||
|
||||
|
||||
@@ -73,6 +73,8 @@ abstract class Connection implements Closeable {
|
||||
while(running.get()) {
|
||||
read()
|
||||
}
|
||||
} catch (SocketTimeoutException e) {
|
||||
close()
|
||||
} catch (Exception e) {
|
||||
if (running.get()) {
|
||||
log.log(Level.WARNING,"unhandled exception in reader",e)
|
||||
|
||||
Reference in New Issue
Block a user