Skip to content

Fix: pass ws_opts to :gun.ws_upgrade/4#120

Merged
mpol1t merged 1 commit into
mpol1t:mainfrom
twinn:main
Jul 14, 2026
Merged

Fix: pass ws_opts to :gun.ws_upgrade/4#120
mpol1t merged 1 commit into
mpol1t:mainfrom
twinn:main

Conversation

@twinn

@twinn twinn commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • ws_opts nested inside gun_opts is documented but was never forwarded to the WebSocket upgrade call
  • Extract ws_opts from gun_opts and pass it explicitly via :gun.ws_upgrade/4
  • Add test verifying ws_opts reaches the upgrade call

Context

:gun.ws_upgrade/3 does not inherit ws_opts from the connection opts passed to :gun.open/3. The 4-arity :gun.ws_upgrade/4 must be used to pass WebSocket-specific options like keepalive and silence_pings.

ws_opts nested inside gun_opts was documented but never actually
forwarded to the WebSocket upgrade call. Extract ws_opts from gun_opts
and pass it explicitly via :gun.ws_upgrade/4.
@twinn
twinn requested a review from mpol1t as a code owner July 14, 2026 13:43

@mpol1t mpol1t left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good to me. Thanks for your contribution!

@mpol1t
mpol1t merged commit 137ae9e into mpol1t:main Jul 14, 2026
1 check 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.

2 participants