i2ptunnel: Retry accept after router soft restart (ticket #2003)

This sends the router restart indication from I2CP router side
to client side to streaming to I2PTunnelServer via
a new streaming exception.
This commit is contained in:
zzz
2018-02-18 13:53:50 +00:00
parent acebd2ea68
commit 826d8ca07f
10 changed files with 71 additions and 10 deletions

View File

@@ -29,6 +29,7 @@ public interface I2PServerSocket {
*
* @throws I2PException if there is a problem with reading a new socket
* from the data available (e.g. the I2PSession is closed)
* @throws RouterRestartException (extends I2PException) if the router is apparently restarting, since 0.9.34
* @throws ConnectException if the I2PServerSocket is closed, or if interrupted.
* Not actually thrown through 0.9.16; thrown as of 0.9.17
* @throws SocketTimeoutException if a timeout was previously set with setSoTimeout and the timeout has been reached.

View File

@@ -0,0 +1,11 @@
package net.i2p.client.streaming;
import net.i2p.I2PException;
/**
* An I2PException thrown from I2PServerSocket.accept()
* when the router is restarting.
*
* @since 0.9.34
*/
public class RouterRestartException extends I2PException {}