You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have both a server and client using UDP, both sending and receiving from each other.
When calling receive on a UDP socket where there's a random chance that it'll fail with an WSAECONNRESET error (currently not catchable as it's unreachable code).
A fix I know currently works:
Updating recvfrom error handling to catch WSAECONNRESET like so:
.WSAECONNRESET => error.ConnectionResetByPeer,
Catching that kind of error when calling sock.receive and ignoring it.
How various libraries avoid this issue:
netcode.c, simply ignores the error and continues.
WSAECONNRESET section says: "On a UDP-datagram socket this error indicates a previous send operation resulted in an ICMP Port Unreachable message."
The text was updated successfully, but these errors were encountered:
silbinarywolf
changed the title
Fix Windows specific bug where WSAECONNRESET can occur randomly with UDP sockets client/host
Fix Windows specific crash bug where WSAECONNRESET can occur randomly with UDP sockets client/host
Jul 8, 2023
silbinarywolf
changed the title
Fix Windows specific crash bug where WSAECONNRESET can occur randomly with UDP sockets client/host
Windows specific crash bug where WSAECONNRESET can occur randomly with UDP sockets client/host
Jul 8, 2023
What's the issue?
I have both a server and client using UDP, both sending and receiving from each other.
When calling
receive
on a UDP socket where there's a random chance that it'll fail with an WSAECONNRESET error (currently not catchable as it's unreachable code).A fix I know currently works:
recvfrom
error handling to catch WSAECONNRESET like so:sock.receive
and ignoring it.How various libraries avoid this issue:
Various other sources talking about this issue:
The text was updated successfully, but these errors were encountered: