Fix: workarounds for two emscripten bugs in the network stack
This commit is contained in:

committed by
Patric Stout

parent
d5b9f7ac37
commit
8fbf5bef60
@@ -129,6 +129,9 @@ void NetworkUDPSocketHandler::ReceivePackets()
|
||||
/* Did we get the bytes for the base header of the packet? */
|
||||
if (nbytes <= 0) break; // No data, i.e. no packet
|
||||
if (nbytes <= 2) continue; // Invalid data; try next packet
|
||||
#ifdef __EMSCRIPTEN__
|
||||
client_len = FixAddrLenForEmscripten(client_addr);
|
||||
#endif
|
||||
|
||||
NetworkAddress address(client_addr, client_len);
|
||||
p.PrepareToRead();
|
||||
|
Reference in New Issue
Block a user