facebookarchive / nifty

Thrift on Netty

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cancelAllTimeouts?

x1957 opened this issue · comments

commented

https://github.com/facebook/nifty/blob/ba507e1c4b446cde0fe9a16ebdbcc7664840a41e/nifty-client/src/main/java/com/facebook/nifty/client/AbstractClientChannel.java#L397

private void onSendTimeoutFired(Request request)
    {
        cancelAllTimeouts();
        WriteTimeoutException timeoutException = new WriteTimeoutException("Timed out waiting " + getSendTimeout() + " to send data to server");
        fireChannelErrorCallback(request.getListener(), new TTransportException(TTransportException.TIMED_OUT, timeoutException));
    }

Why cancel all timeouts when one request timeout?