-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[bug] SetReadDeadLine did not work #549
Comments
What is the full program? What are you reading off the socket?
The deadline won’t be reached if ReadMessage returns faster than the
deadline.
|
Windows 10 Professional 64 bit:10.0.17763.774
result: |
You need to return from the loop if err is non nil. |
You're right. But I'm curious as to why the timeout didn't work. The above log was printed in a flash. |
Well you set a deadline of 1s. Also, once a deadline is hit, the connection is done, see #474 |
Ok, got it. ୧(๑•̀◡•́๑)૭ |
go version: 1.12.8
platform: win10、macos、android
When I used wsc.SetReadDeadLine, I found that the ReadMessage exited before the timeout period reached, resulting in high-frequency execution of the loop and eventually crash.
`
for {
`
The text was updated successfully, but these errors were encountered: