You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Set ENet service time to 0.
Process all packets in queue, but never wait.
This commit is contained in:
@@ -207,13 +207,13 @@ void NetworkedMultiplayerENet::poll() {
|
|||||||
_pop_current_packet();
|
_pop_current_packet();
|
||||||
|
|
||||||
ENetEvent event;
|
ENetEvent event;
|
||||||
/* Wait up to 1000 milliseconds for an event. */
|
/* Keep servicing until there are no available events left in queue. */
|
||||||
while (true) {
|
while (true) {
|
||||||
|
|
||||||
if (!host || !active) // Might have been disconnected while emitting a notification
|
if (!host || !active) // Might have been disconnected while emitting a notification
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int ret = enet_host_service(host, &event, 1);
|
int ret = enet_host_service(host, &event, 0);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
// Error, do something?
|
// Error, do something?
|
||||||
|
|||||||
Reference in New Issue
Block a user