Skip to content

websocket: respect wss dial timeout#32

Merged
WineChord merged 1 commit into
trpc-group:mainfrom
Rememorio:fix_websocket_dial_timeout
Jun 18, 2026
Merged

websocket: respect wss dial timeout#32
WineChord merged 1 commit into
trpc-group:mainfrom
Rememorio:fix_websocket_dial_timeout

Conversation

@Rememorio

@Rememorio Rememorio commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Pass the configured websocket client timeout into WSS TLS dialing.
  • Apply the same timeout to the HTTP Upgrade handshake and clear the deadline after a successful upgrade.
  • Close the raw connection on failed client upgrade paths.
  • Add regression tests for WSS TLS handshake timeout and websocket upgrade timeout.
  • Initialize the outbound-buffer test TCP fixture so root package tests do not panic when closing it.

Compatibility

This is a bug fix for existing WithTimeout behavior. It does not add or remove public APIs.

Validation

  • cd extensions/websocket && go test ./... -count=1
  • go test . -run TestTCPConnWritevOutboundBufferLimitExceeded -count=1
  • go test . -count=1

@Rememorio Rememorio force-pushed the fix_websocket_dial_timeout branch from 6ece92c to f6eedd4 Compare June 17, 2026 09:03

@WineChord WineChord left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@WineChord WineChord merged commit 6b64c61 into trpc-group:main Jun 18, 2026
6 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants