Dev - #1
Open
ArnabChatterjee20k wants to merge 38 commits into
Open
Dev#1ArnabChatterjee20k wants to merge 38 commits into
ArnabChatterjee20k wants to merge 38 commits into
Conversation
|
The adapter pins worker_num to 1, so a single process holds every connection and a plain array is a complete view. Apps that scale workers keep their own authoritative connection state (as the Appwrite MQTT messaging adapter does), so the transport list is a local convenience — no need for a Swoole\Table's cross-worker guarantee.
The transport is a byte pipe: start/shutdown/send/close plus the lifecycle hooks. It no longer tracks which fds are connected — an application that needs that keeps its own map, learning of a client from the CONNECT packet (onReceive) and of a drop from onClose, keyed by whatever domain state it attaches to each fd. Removes getConnections from the Adapter contract, the Swoole registry, and the Server wrapper.
outputs: type=cacheonly discarded the image that load: true and the mqtt-<php>-dev tag were meant to export, so docker compose up rebuilt it from scratch on every job. Drop the cacheonly output; the image is now loaded and compose reuses it, while cache-from/cache-to still warm the gha layer cache.
feat: keep-alive wheel and subscription store
A throwing onError or onClose handler skipped handleClose()/socket close, leaving the client marked connected with the socket open, and let listen() emit onError twice. Wrap the close and error emits in try/finally so the socket always closes and the error is reported once.
receive()'s final emit('receive') was unguarded, so a throwing onReceive
escaped with the client still marked connected and its socket open. Guard
it like the other terminal paths: report via onError once, close in a
finally, and return null.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.