[BUG] State Transition from eCONNECT_SYN to eCLOSE_WAIT?

Open
#1,301 5 comments 0 reactions 0 assignees View on GitHub

@94xhn is already working on this.

Since Jul 10, 2026.

  • #1355 by @94xhn — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
networking

Research direction

Start with the SYN-SENT error handling in source/FreeRTOS_TCP_Transmission.c, lines 115-139 of the linked commit, and trace which state the connection moves to on failure or timeout. Pull request #1355 is already open against this issue, so check it and its review thread before starting any change. Done means that failed or timed-out connection attempts end in the closed state, as RFC 793 requires, and that the existing networking tests still pass.

Written by the indexing model from the issue text.

Description

bug

Describe the bug
The TCP state machine incorrectly transitions from eCONNECT_SYN (SYN-SENT) to eCLOSE_WAIT in error scenarios. Per RFC 793, connections that fail during establishment should transition to eCLOSED, not eCLOSE_WAIT.

https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/22c095e9c3bff7773085dd9b061a0013200eadda/source/FreeRTOS_TCP_Transmission.c#L115-L139

RFC 793 Compliance Issue

RFC 793 specifies that SYN-SENT state errors/timeouts should transition to CLOSED, not CLOSE-WAIT.

Dominant language
C
Stars
215
Forks
222
PR merge metrics
No merged PRs in 30d

Getting set up

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.

More from FreeRTOS/FreeRTOS-Plus-TCP

All issues in FreeRTOS/FreeRTOS-Plus-TCP

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.