mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-17 17:05:50 +00:00
Run a full enet_host_service() rather than just enet_host_flush() on send
This commit is contained in:
parent
97216e1704
commit
50c0648de2
@ -533,16 +533,13 @@ static bool sendMessageEnet(short ptype, short paylen, const void* payload) {
|
|||||||
|
|
||||||
PltLockMutex(&enetMutex);
|
PltLockMutex(&enetMutex);
|
||||||
err = enet_peer_send(peer, 0, enetPacket);
|
err = enet_peer_send(peer, 0, enetPacket);
|
||||||
|
enet_host_service(client, NULL, 0);
|
||||||
PltUnlockMutex(&enetMutex);
|
PltUnlockMutex(&enetMutex);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
Limelog("Failed to send ENet control packet\n");
|
Limelog("Failed to send ENet control packet\n");
|
||||||
enet_packet_destroy(enetPacket);
|
enet_packet_destroy(enetPacket);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
PltLockMutex(&enetMutex);
|
|
||||||
enet_host_flush(client);
|
|
||||||
PltUnlockMutex(&enetMutex);
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user