fix flushing

This commit is contained in:
Protryon 2019-05-04 17:30:23 -07:00
parent fcf1b6365d
commit 43adb01459
1 changed files with 2 additions and 2 deletions

View File

@ -28,8 +28,8 @@
void flush_outgoing(struct player* player) {
if (player->conn == NULL) return;
struct packet* packet;
while (packet = queue_maybepop(player->outgoing_packets) != NULL) {
packet_write(player->conn, player);
while ((packet = queue_maybepop(player->outgoing_packets)) != NULL) {
packet_write(player->conn, packet);
}
netmgr_trigger_write(player->conn->managed_conn);
}