Commit e75b5fd8 authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

rpc: disable Grizzly's default idle connection timeout

Ached-by: Gerd
parent bc359823
......@@ -20,6 +20,7 @@ import com.sun.grizzly.Controller;
import com.sun.grizzly.ControllerStateListenerAdapter;
import com.sun.grizzly.DefaultProtocolChain;
import com.sun.grizzly.DefaultProtocolChainInstanceHandler;
import com.sun.grizzly.DefaultSelectionKeyHandler;
import com.sun.grizzly.PortRange;
import com.sun.grizzly.ProtocolChain;
import com.sun.grizzly.ProtocolChainInstanceHandler;
......@@ -69,12 +70,25 @@ public class OncRpcSvc {
final ProtocolFilter rpcProcessor = new RpcProtocolFilter();
final ProtocolFilter rpcDispatcher = new RpcDispatcher(_programs);
* By default, a SelectionKey will be active for 30 seconds.
* If during that 30 seconds the client isn't pushing bytes
* (or closing the connection), the SelectionKey will expire
* and its channel closed.
* We set expire timeout to -1, which equal to 'never'.
DefaultSelectionKeyHandler keyHandler = new DefaultSelectionKeyHandler();
final TCPSelectorHandler tcp_handler = new TCPSelectorHandler();
final UDPSelectorHandler udp_handler = new UDPSelectorHandler();
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment