Title: ProtocolError on receive_data after connection is closed · Issue #1199 · python-hyper/h2 · GitHub
Open Graph Title: ProtocolError on receive_data after connection is closed · Issue #1199 · python-hyper/h2
X Title: ProtocolError on receive_data after connection is closed · Issue #1199 · python-hyper/h2
Description: I am randomly getting this error on h2 3.1.1 (about once a week on a busy H2 client): Traceback (most recent call last): File "site-packages/h2/connection.py", line 224, in process_input func, target_state = self._transitions[(self.state...
Open Graph Description: I am randomly getting this error on h2 3.1.1 (about once a week on a busy H2 client): Traceback (most recent call last): File "site-packages/h2/connection.py", line 224, in process_input func, targ...
X Description: I am randomly getting this error on h2 3.1.1 (about once a week on a busy H2 client): Traceback (most recent call last): File "site-packages/h2/connection.py", line 224, in process_input ...
Opengraph URL: https://github.com/python-hyper/h2/issues/1199
X: @github
Domain: github.com
IPv4 address: 140.82.112.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ProtocolError on receive_data after connection is closed","articleBody":"I am randomly getting this error on h2 3.1.1 (about once a week on a busy H2 client):\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"site-packages/h2/connection.py\", line 224, in process_input\r\n func, target_state = self._transitions[(self.state, input_)]\r\nKeyError: (\u003cConnectionState.CLOSED: 3>, \u003cConnectionInputs.RECV_PING: 14>)\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"nameclient.py\", line 84, in recv_task\r\n for event in self.conn.receive_data(data):\r\n File \"site-packages/h2/connection.py\", line 1463, in receive_data\r\n events.extend(self._receive_frame(frame))\r\n File \"site-packages/h2/connection.py\", line 1486, in _receive_frame\r\n frames, events = self._frame_dispatch_table[frame.__class__](frame)\r\n File \"site-packages/h2/connection.py\", line 1725, in _receive_ping_frame\r\n ConnectionInputs.RECV_PING\r\n File \"site-packages/h2/connection.py\", line 229, in process_input\r\n \"Invalid input %s in state %s\" % (input_, old_state)\r\nh2.exceptions.ProtocolError: Invalid input ConnectionInputs.RECV_PING in state ConnectionState.CLOSED\r\n```\r\n\r\nUnfortunately the code is somewhat complicated but I believe the connection closing logic to be correct. I never call close_connection and I quit receiving once ConnectionTerminated appears.\r\n\r\nPossibly H2 is internally closing the connection due to ping timeout or other issue, and then throws me an error when the peer still sends something. Quite likely this actually happens when my laptop is in sleep, and H2 going ping-timeout meanwhile, with some data still in receive buffers. I would expect a ConnectionTerminated event in that case, after any remaining events are relayed, not an exception.\r\n","author":{"url":"https://github.com/Tronic","@type":"Person","name":"Tronic"},"datePublished":"2019-09-03T04:51:13Z","url":"https://github.com/python-hyper/h2/issues/1199"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f625590d-47de-8d27-aba2-016258982ea0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E56C:22ACDC:EA294A:13F1DAB:6B06EFA9 |
| html-safe-nonce | 9ec75771241462d8158c0df3f5d7750873b00459574ad7a5baf0fb072a72b445 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTZDOjIyQUNEQzpFQTI5NEE6MTNGMURBQjo2QjA2RUZBOSIsInZpc2l0b3JfaWQiOiIxNTU0MTc2MjE0NjkxMTQ3Njg5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ed94ec69f20200a6643347f7e7a9bacf145db89009920dc03a21e7a4d95c6e38 |
| hovercard-subject-tag | issue:488390501 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-hyper/h2/1199/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1f04f19e2af8a2e21eceb7624269bf952cd01e55a9fbe479ff7026dee6fa7197/python-hyper/h2/issues/1199 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1f04f19e2af8a2e21eceb7624269bf952cd01e55a9fbe479ff7026dee6fa7197/python-hyper/h2/issues/1199 |
| og:image:alt | I am randomly getting this error on h2 3.1.1 (about once a week on a busy H2 client): Traceback (most recent call last): File "site-packages/h2/connection.py", line 224, in process_input func, targ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Tronic |
| hostname | github.com |
| expected-hostname | github.com |
| None | 351ea5ca38a5758919d44ee52c70fe9003c0c2dfa20f04effd7fac0c5330c16b |
| turbo-cache-control | no-preview |
| go-import | github.com/python-hyper/h2 git https://github.com/python-hyper/h2.git |
| octolytics-dimension-user_id | 13035907 |
| octolytics-dimension-user_login | python-hyper |
| octolytics-dimension-repository_id | 37996233 |
| octolytics-dimension-repository_nwo | python-hyper/h2 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 37996233 |
| octolytics-dimension-repository_network_root_nwo | python-hyper/h2 |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 891bde3f438884e9c6c7ccd826f33805910a978b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width