nghttp2 icon indicating copy to clipboard operation
nghttp2 copied to clipboard

Is it possible to know when a connection has been broken? (asio lib)

Open samuxiii opened this issue 6 years ago • 2 comments

Hi, In the scenario where an established connection is interrupted by a network outage, is it possible to get the error code? It seems the on_error callback is not being called and I would like to recover the error_code/information and manage it.

Also I've seen a ping is being sent recursively whereas a session is alive using

 _session_impl::handle_ping (const boost::system::error_code &ec)_ 

but this function doesn't return or process the error it gets from nghttp2_submit_ping .

Thank you so much in advance

samuxiii avatar May 24 '19 12:05 samuxiii

What does handle_ping have to do with it? the session class has the on_error method.

Best, A.

akonskarm avatar Jan 31 '20 11:01 akonskarm

bump @samuxiii says explicitly that on_error() is NOT called, and that is something I have been seeing as well. The session gets broken for yet unknown reasons (timeout? network outage w/o TCP reset) and does not report it via the callback.

Any subsequent requests result in an "unknown error".

pgit avatar Sep 07 '22 14:09 pgit

Closed since asio library has been removed.

tatsuhiro-t avatar Mar 23 '24 06:03 tatsuhiro-t