swift-server / swift-server/async-http-client

Invalid state: idle

Open
#927 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
1.1k
Forks
156
PR merge metrics
No merged PRs in 30d

Description

Hello,

I am seeing an odd issue. I am running a Swift based server and now randomly get a crash with this message.
AsyncHTTPClient/HTTP1ConnectionStateMachine.swift:332: Fatal error: Invalid state: idle

I am unable to reliably reproduce it, as it is random. My code has not really changed very much (certainly not enough to explain what's going on here).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with AsyncHTTPClient/HTTP1ConnectionStateMachine.swift at line 332 and investigate the transition that reaches the invalid idle state. First work toward a reliable reproduction of the random crash; done means the invalid state is understood and covered by a regression test or otherwise prevented.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.