Skip to content

fix: separate connect and recv timeouts in JsonClient#25

Merged
chris-piekarski merged 2 commits into
fixes_docs_ci_version_bumpfrom
copilot/sub-pr-24
Feb 7, 2026
Merged

fix: separate connect and recv timeouts in JsonClient#25
chris-piekarski merged 2 commits into
fixes_docs_ci_version_bumpfrom
copilot/sub-pr-24

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 7, 2026

recv_timeout is documented as controlling "connection read timeout" but was also governing connect() operations, making it impossible to tune connect and read timeouts independently.

Changes

  • JsonClient.__init__: Use timeout for initial socket (governs connect attempts)
  • JsonClient.connect(): Switch to recv_timeout after successful connection
  • Retry logic: Recreate sockets with timeout for subsequent connect attempts

Example

# Connect timeout of 2.0s, read timeout of 30.0s
client = JsonClient(address='10.0.0.1', port=5489, timeout=2.0, recv_timeout=30.0)
client.connect()  # Uses 2.0s timeout
client.read_obj()  # Uses 30.0s timeout

Previously both operations would use 30.0s timeout.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: chris-piekarski <411331+chris-piekarski@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix feedback on CI version bump documentation fix: separate connect and recv timeouts in JsonClient Feb 7, 2026
Copilot AI requested a review from chris-piekarski February 7, 2026 06:35
@chris-piekarski chris-piekarski marked this pull request as ready for review February 7, 2026 06:37
@chris-piekarski chris-piekarski merged commit 4364821 into fixes_docs_ci_version_bump Feb 7, 2026
chris-piekarski added a commit that referenced this pull request Feb 7, 2026
* fix: address possible desync framing scenarios

* ci: fix makefile and lint issues

* ci: actions lint error

* ci: additional unit and behave coverage
fix: break out socket timeouts
fix: reduce possible fd leak

* docs: update for dual timeout options

* ci: legacy...

* fix: separate connect and recv timeouts in JsonClient (#25)

* Initial plan

* fix: separate connect and recv timeouts in JsonClient

Co-authored-by: chris-piekarski <411331+chris-piekarski@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: chris-piekarski <411331+chris-piekarski@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: chris-piekarski <411331+chris-piekarski@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants