Added HttpTimeout#293
Conversation
Added an option to modify the default 90 seconds that the client waits before timing out when connecting to a server.
|
Hmm, setting it to 10 seconds doesn't seem to fix my issue. |
|
Alright I've got something working now. Basically whenever you do new TcpClient(hostname, port) it locks the thread for an uncertain amount of time. I used the answer from here http://stackoverflow.com/questions/17118632/how-to-set-the-timeout-for-a-tcpclient to create the tcpClientWithTimeout method. This basically does the same as new TcpClient except that it uses the value of _tcpTimeout as timeout. |
|
@jespertheend awesome, I was just reading up on the connection code and found the hardcoded 90secs. Before writing a patch I came and found yours - hopefully it will be merged soon :) |
I needed a way to shorten the time the client waits before timing out. I could have hard coded it but I figured I might as well add a pull request.
This pull request adds TimeSpan HttpTimeout to the WebSocket class that you can set in order to modify the default 90 seconds.