You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: trigger onOpen callback in Swift WebSocket after upgrade completes
Previously, the onOpen callback was not being triggered when a WebSocket
connection was established. This was due to a lifecycle timing issue where
the MessageHandler's channelActive method was never called.
The issue occurred because:
1. HTTP channel becomes active first
2. HTTP-to-WebSocket upgrade happens
3. MessageHandler is added to the pipeline after the channel is already active
4. channelActive only fires when a handler is added to an inactive channel
The fix explicitly triggers the onOpen callback in the upgradePipelineHandler
method after successfully adding the MessageHandler to the pipeline, which is
exactly when the WebSocket connection is fully established.
This ensures the onOpen callback works correctly in all SDKs that depend on
this Swift WebSocket client, including the Apple (iOS/macOS) SDK.
0 commit comments