{"action":"created","issue":{"url":"https://api.github.com/repos/nghttp2/nghttp2/issues/729","repository_url":"https://api.github.com/repos/nghttp2/nghttp2","labels_url":"https://api.github.com/repos/nghttp2/nghttp2/issues/729/labels{/name}","comments_url":"https://api.github.com/repos/nghttp2/nghttp2/issues/729/comments","events_url":"https://api.github.com/repos/nghttp2/nghttp2/issues/729/events","html_url":"https://github.com/nghttp2/nghttp2/issues/729","id":190700297,"number":729,"title":"Server's response.on_close callback is not called when the client closes its connection","user":{"login":"anithakathir","id":3538807,"avatar_url":"https://avatars.githubusercontent.com/u/3538807?v=3","gravatar_id":"","url":"https://api.github.com/users/anithakathir","html_url":"https://github.com/anithakathir","followers_url":"https://api.github.com/users/anithakathir/followers","following_url":"https://api.github.com/users/anithakathir/following{/other_user}","gists_url":"https://api.github.com/users/anithakathir/gists{/gist_id}","starred_url":"https://api.github.com/users/anithakathir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anithakathir/subscriptions","organizations_url":"https://api.github.com/users/anithakathir/orgs","repos_url":"https://api.github.com/users/anithakathir/repos","events_url":"https://api.github.com/users/anithakathir/events{/privacy}","received_events_url":"https://api.github.com/users/anithakathir/received_events","type":"User","site_admin":false},"labels":[{"id":290103233,"url":"https://api.github.com/repos/nghttp2/nghttp2/labels/asio","name":"asio","color":"e11d21","default":false},{"id":48072552,"url":"https://api.github.com/repos/nghttp2/nghttp2/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/nghttp2/nghttp2/milestones/11","html_url":"https://github.com/nghttp2/nghttp2/milestones/v1.17.0","labels_url":"https://api.github.com/repos/nghttp2/nghttp2/milestones/11/labels","id":2026591,"number":11,"title":"v1.17.0","description":"","creator":{"login":"tatsuhiro-t","id":404610,"avatar_url":"https://avatars.githubusercontent.com/u/404610?v=3","gravatar_id":"","url":"https://api.github.com/users/tatsuhiro-t","html_url":"https://github.com/tatsuhiro-t","followers_url":"https://api.github.com/users/tatsuhiro-t/followers","following_url":"https://api.github.com/users/tatsuhiro-t/following{/other_user}","gists_url":"https://api.github.com/users/tatsuhiro-t/gists{/gist_id}","starred_url":"https://api.github.com/users/tatsuhiro-t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatsuhiro-t/subscriptions","organizations_url":"https://api.github.com/users/tatsuhiro-t/orgs","repos_url":"https://api.github.com/users/tatsuhiro-t/repos","events_url":"https://api.github.com/users/tatsuhiro-t/events{/privacy}","received_events_url":"https://api.github.com/users/tatsuhiro-t/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":5,"state":"open","created_at":"2016-09-25T03:18:17Z","updated_at":"2016-11-21T13:45:34Z","due_on":"2016-11-25T00:00:00Z","closed_at":null},"comments":4,"created_at":"2016-11-21T12:17:27Z","updated_at":"2016-11-23T04:43:08Z","closed_at":null,"body":"Hi,\r\n\r\nI'm trying to simulate a nghttp2 asio client server application. Please find the code for the same, [here](https://github.com/anithakathir/nghttp2_asio_sample) . I'm assuming that the server takes more than 60 seconds(default client timeout) to process. \r\nThe client closes its connection after a minute; but the server tries to send the response back to the client on the same connection(which is already closed) and seg-faulting. \r\nA `reponse.on_close` callback is registered in the server side, which is never called when the client closes the connection.\r\n\r\nHere's the coredump from the server side when client closes the connection:\r\n\r\n```\r\n#0  0x000000000040a520 in boost::asio::detail::task_io_service::post_immediate_completion (this=0x0, op=0x7f22c80008c0, is_continuation=false) at /usr/include/boost/asio/detail/impl/task_io_service.ipp:264\r\n#1  0x0000000000407c40 in boost::asio::detail::task_io_service::post<req_callback(const nghttp2::asio_http2::server::response&)::<lambda()>::<lambda()> >(<lambda()>::<lambda()> &) (this=0x0, handler=...) at /usr/include/boost/asio/detail/impl/task_io_service.hpp:70\r\n#2  0x000000000040787e in boost::asio::io_service::post<req_callback(const nghttp2::asio_http2::server::response&)::<lambda()>::<lambda()> >(<unknown type in /home/indix/Work/Anil/nghttp2_asio_sample/build/nghttp2_server, CU 0x0, DIE 0x2344c>) (this=0x7f22d000275a, \r\n    handler=<unknown type in /home/indix/Work/Anil/nghttp2_asio_sample/build/nghttp2_server, CU 0x0, DIE 0x2344c>) at /usr/include/boost/asio/impl/io_service.hpp:108\r\n#3  0x000000000040737f in <lambda()>::operator()(void) const (__closure=0x7f22d0000cc8) at ../server/nghttp2_server.cpp:19\r\n#4  0x000000000040929a in std::_Bind_simple<req_callback(const nghttp2::asio_http2::server::response&)::<lambda()>()>::_M_invoke<>(std::_Index_tuple<>) (this=0x7f22d0000cc8)\r\n    at /usr/include/c++/4.9/functional:1700\r\n#5  0x00000000004091e5 in std::_Bind_simple<req_callback(const nghttp2::asio_http2::server::response&)::<lambda()>()>::operator()(void) (this=0x7f22d0000cc8)\r\n    at /usr/include/c++/4.9/functional:1688\r\n#6  0x0000000000409162 in std::thread::_Impl<std::_Bind_simple<req_callback(const nghttp2::asio_http2::server::response&)::<lambda()>()> >::_M_run(void) (\r\n    this=0x7f22d0000cb0) at /usr/include/c++/4.9/thread:115\r\n#7  0x00007f22d9680c30 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6\r\n#8  0x00007f22d990a184 in start_thread (arg=0x7f22d7ed4700) at pthread_create.c:312\r\n#9  0x00007f22d910e37d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111\r\n```\r\nPlease note that the `this` pointer in frame#1 is `null`. \r\n\r\nCould you please clarify on this ? "},"comment":{"url":"https://api.github.com/repos/nghttp2/nghttp2/issues/comments/262433734","html_url":"https://github.com/nghttp2/nghttp2/issues/729#issuecomment-262433734","issue_url":"https://api.github.com/repos/nghttp2/nghttp2/issues/729","id":262433734,"user":{"login":"anithakathir","id":3538807,"avatar_url":"https://avatars.githubusercontent.com/u/3538807?v=3","gravatar_id":"","url":"https://api.github.com/users/anithakathir","html_url":"https://github.com/anithakathir","followers_url":"https://api.github.com/users/anithakathir/followers","following_url":"https://api.github.com/users/anithakathir/following{/other_user}","gists_url":"https://api.github.com/users/anithakathir/gists{/gist_id}","starred_url":"https://api.github.com/users/anithakathir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anithakathir/subscriptions","organizations_url":"https://api.github.com/users/anithakathir/orgs","repos_url":"https://api.github.com/users/anithakathir/repos","events_url":"https://api.github.com/users/anithakathir/events{/privacy}","received_events_url":"https://api.github.com/users/anithakathir/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T04:43:08Z","updated_at":"2016-11-23T04:43:08Z","body":"Thanks @tatsuhiro-t san!"}}
{"actor":{"display_login":"anithakathir"}}