Fixed another instance of only checking for EAGAIN from a socket, from Ala-lala

This commit is contained in:
Michael Martin
2019-10-01 23:58:49 -07:00
parent d884b3f6d6
commit a5e233fb11
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -16,6 +16,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#define PORT_WANT_ERRNO
#include "port.h"
#include "netmelee.h"
#include "libs/alarm.h"
#include "libs/callback.h"
@@ -197,7 +199,7 @@ flushPacketQueues(void) {
continue;
flushStatus = flushPacketQueue(conn);
if (flushStatus == -1 && errno != EAGAIN)
if (flushStatus == -1 && errno != EAGAIN && errno != EWOULDBLOCK)
closePlayerNetworkConnection(player);
}
}
+2 -2
View File
@@ -104,8 +104,8 @@ queuePacket(NetConnection *conn, Packet *packet) {
// If an error occurs during sending, we leave the unsent packets in
// the queue, and let the caller decide what to do with them.
// This function may return -1 with errno EAGAIN if we're waiting for
// the other party to act first.
// This function may return -1 with errno EAGAIN or EWOULDBLOCK
// if we're waiting for the other party to act first.
static int
flushPacketQueueLinks(NetConnection *conn, PacketQueueLink **first) {
PacketQueueLink *link;