Fixed another instance of only checking for EAGAIN from a socket, from Ala-lala
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user