connectTimeout property

Duration connectTimeout
final

How long connect waits for the WebSocket handshake to complete. WebSocket.connect has no timeout of its own, so a connection attempt on a blocked network (e.g. an app in the background on Android 17) could otherwise stay pending forever.

Implementation

final Duration connectTimeout;