Skip to content

Invalid input ConnectionInputs.RECV_HEADERS in state ConnectionState.CLOSED #37

@dimaqq

Description

@dimaqq

Got this error and traceback in production:

ProtocolError
Invalid input ConnectionInputs.RECV_HEADERS in state ConnectionState.CLOSED

h2/connection.py in process_input at line 228

h2/connection.py in _receive_headers_frame at line 1554

h2/connection.py in _receive_frame at line 1486

h2/connection.py in receive_data at line 1463

aapns/connection.py in background_read at line 300

Current code in question is:

while not self.closed:
data = await self.read_stream.read(2 ** 16)
if not data:
raise ConnectionError("Server closed the connection")
for event in self.protocol.receive_data(data):
logger.debug("APN: %s", event)
stream_id = getattr(event, "stream_id", 0)
error = getattr(event, "error_code", None)
channel = self.channels.get(stream_id)

Also, looks like that prod was not running the newest aapns 🤔

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions