Skip to content

Correct the SocketPool docs about one pool and connecting - #11706

Merged
dhalbert merged 2 commits into
adafruit:mainfrom
mikeysklar:fix-9481-socketpool-docs
Nov 1, 2026
Merged

dhalbert merged 2 commits into
adafruit:mainfrom
mikeysklar:fix-9481-socketpool-docs

Conversation

@mikeysklar

Copy link
Copy Markdown
Collaborator

What

Docs only: several pools are allowed, and a pool can be created before connecting.

Why

Fixes #9481.

The pool object holds no state on any port.

A one-pool rule would only break working code.

Testing

claim desktop lab source, all ports with Python-visible pools
Two pools are separate and both work yes make_new always allocates
Pool created with radio off works later yes constructor only checks which interface
Pool works after reconnect yes, weak test pool has no fields to go stale
Pools share the socket limit not shown sockets are opened without using the pool
Access point mode can use a pool not supported httpserver_simpletest_manual_ap.py does it

Strict docs build passes. No hardware run.

AI assistance

Written with Claude Code, which ran the desktop lab tests and the docs build and read the port source.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread shared-bindings/socketpool/SocketPool.c Resolved
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mikeysklar
mikeysklar requested a review from dhalbert November 1, 2026 16:23

@dhalbert dhalbert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine. It's a convenience that there can be multiple pool objects, but it appears that there is no practical difference between them. I could imagine that different pools might be created locally in code so they don't have to be passed around or something.

@dhalbert
dhalbert merged commit 5e4596e into adafruit:main Nov 1, 2026
319 checks passed
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.

SocketPool requirements and documentation

3 participants