Closed juzi5201314 closed 4 years ago
The easiest way is to use a TimeoutCancellationToken
passed to Connector::connect()
to reduce the overall connection timeout.
You can also use the HttpClient
passed to Rfc6455Connector
to modify the request timeouts. However this is a bit clunky for something that should be simpler. In that light, I've added some methods to Handshake
(in ab84d50d131222c057050dac3b3cb800761c4352) to easily modify the TCP connect timeout and TLS handshake timeout (if applicable).
Allow specified connection timeout? Now when the target cannot be accessed, "Uncaught Amp \ Socket \ ConnectException: Connecting to tcp: // localhost: 10000 failed: timeout exceeded (10000 ms)" will occur. But the 10 second timeout is too long