Oleg,
I am using http nio/core (version 4.0.1) and I got some NullPointerException
when the connection times out.
[10002 /127.0.0.1:3556] 2009/11/13 11:29:58.665-0800
DEBUG;[nio.impl.HttpIoReactor:218] Unhandled RuntimeException:
java.lang.NullPointerException
at
org.apache.http.nio.protocol.AsyncNHttpClientHandler.timeout(AsyncNHttpClientHandler.java:344)
at
org.apache.http.impl.nio.DefaultClientIOEventDispatch.timeout(DefaultClientIOEventDispatch.java:158)
at
org.apache.http.impl.nio.reactor.BaseIOReactor.timeoutCheck(BaseIOReactor.java:255)
at
org.apache.http.impl.nio.reactor.BaseIOReactor.validate(BaseIOReactor.java:203)
at
org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:260)
at
org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:96)
at
org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:556)
Looking at the code,
ClientConnState connState = (ClientConnState) context.getAttribute(CONN_STATE);
try {
if (connState.getOutputState() == ClientConnState.EXPECT_CONTINUE) {
......
}catch(IOException e){
}
handleTimeout();
It could happen if the attribute get removed somehow before execution comes
here.... It might be safer to check it being NULL or not....
Thanks,
Yong
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]