File diff r7365:42ddcb060daf → r7366:6d41b24b72e7
src/network/core/udp.cpp
Show inline comments
 
@@ -107,12 +107,13 @@ void NetworkUDPSocketHandler::ReceivePac
 
	if (!this->IsConnected()) return;
 

	
 
	packet_len = sizeof(p.buffer);
 
	client_len = sizeof(client_addr);
 

	
 
	/* Try to receive anything */
 
	SetNonBlocking(this->sock); // Some OSes seem to loose the non-blocking status of the socket
 
	nbytes = recvfrom(this->sock, (char*)p.buffer, packet_len, 0, (struct sockaddr *)&client_addr, &client_len);
 

	
 
	/* We got some bytes for the base header of the packet. */
 
	if (nbytes > 2) {
 
		p.PrepareToRead();