-
Notifications
You must be signed in to change notification settings - Fork 42
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
Windows: WARN:smartdns::server::udp:36: error receiving message on udp_socket (and fix) #391
Comments
Thanks, Looks good, I'll check it out this weekend. There is already a ready-made code, you can just adjust it and give it a try. The corresponding code is here: Lines 330 to 350 in 669e379
|
I solved this problem a long time ago. At that time, the program crashed. I just changed the error to a warning so that it would not affect the use. |
Done and compiled! No more UDP errors in Windows! btw it needs the "unsafe declaration" cause of "WSAIoctl". CARGO.TOML add: MOD.RS:
ps: i did update all the cargo packages to the latest versions and only rustls has a breaking change. |
Calling Windows API, unsafe seems to be inevitable. But I prefer to use |
Windows GNU build produces UDP 38 error |
Indeed, GNU has not solved this problem. I don't have time to find a solution, and if it is solved, it will only reduce the log warning, which does not affect the use. |
Only in windows it throws and UDP warning:
WARN:smartdns::server::udp:36: error receiving message on udp_socket: An existing connection was forcibly closed by the remote host. (os error 10054)
Here's the solution for windows only in rust:
shadowsocks/shadowsocks-rust#262 (comment)
You'll need to import the winapi package too: https://crates.io/crates/winapi
from notes:
Ignoring UdpSocket's WSAECONNRESET error
This is because UdpSocket::recv_from may return WSAECONNRESET
if you called UdpSocket::send_to a destination that is not existed (may be closed).
It is not an error. Could be ignored completely.
We have to ignore it here because it will crash the server.
I hope you add it soon
discussion: #368
The text was updated successfully, but these errors were encountered: