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

Timeout #5

Open
MALDRU opened this issue Mar 21, 2021 · 1 comment
Open

Timeout #5

MALDRU opened this issue Mar 21, 2021 · 1 comment

Comments

@MALDRU
Copy link

MALDRU commented Mar 21, 2021

Hello,

Is there a way to specify the timeout when connecting?

Thanks.

@loothood
Copy link

loothood commented Oct 20, 2022

Is there a way to specify the timeout when connecting?

Hi, there is a workaround:

final socket = await WebSocket.connect('ws://localhost:$port').timeout(const Duration(seconds: 3));

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

2 participants