mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-07-01 23:35:58 +00:00
Send unreliable traffic as reliable when we have just one channel
This commit is contained in:
parent
2d0badde9a
commit
2ac25bebaa
@ -634,6 +634,14 @@ static bool sendMessageEnet(short ptype, short paylen, const void* payload, uint
|
||||
// the peer's supported channel count.
|
||||
if (!IS_SUNSHINE() || channelId >= peer->channelCount) {
|
||||
channelId = 0;
|
||||
|
||||
// Send unreliable traffic as reliable if we only have one channel.
|
||||
// This avoids unwanted sequencing between reliable and unreliable
|
||||
// traffic that can lead to delays.
|
||||
if (flags == 0) {
|
||||
flags |= ENET_PACKET_FLAG_RELIABLE;
|
||||
enetPacket->flags |= ENET_PACKET_FLAG_RELIABLE;
|
||||
}
|
||||
}
|
||||
|
||||
// Queue the packet to be sent
|
||||
|
Loading…
x
Reference in New Issue
Block a user