Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a timeout option for connection #206

Open
GuittonHubert opened this issue Nov 6, 2023 · 0 comments
Open

Adding a timeout option for connection #206

GuittonHubert opened this issue Nov 6, 2023 · 0 comments

Comments

@GuittonHubert
Copy link

GuittonHubert commented Nov 6, 2023

Hello,

Unless already possible using scripts, would it be possible to add a command line option to specify a timeout for the WebSocket handshake, please? The aim is to detect a potential connection failure. In that case, websocat only fails after 60 seconds:

$> websocat -k -vvv --max-messages 0 wss://<url>

[INFO  websocat::lints] Auto-inserting the line mode
[DEBUG websocat] Done third phase of interpreting options.
[DEBUG websocat] Done fourth phase of interpreting options.
[DEBUG websocat] Preparation done. Now actually starting.
...
[INFO  websocat::stdio_threaded_peer] get_stdio_peer (threaded)
[DEBUG websocat::sessionserve] Underlying connection established
[INFO  websocat::ws_client_peer] get_ws_client_peer
websocat: WebSocketError: WebSocketError: Received unexpected status code (504 Gateway Timeout)
websocat: error running

Thank you for your support.

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

No branches or pull requests

1 participant