mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
adding enabled check to loops (#1836)
Message can disable transport so we need to check if it is still enabled before checking the next message
This commit is contained in:
parent
ff4a576b13
commit
7de3c74614
@ -137,6 +137,13 @@ public void LateUpdate()
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// Some messages can disable transport
|
||||
// If this is disabled stop processing message in queue
|
||||
if (!enabled)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// process a maximum amount of server messages per tick
|
||||
@ -147,6 +154,13 @@ public void LateUpdate()
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// Some messages can disable transport
|
||||
// If this is disabled stop processing message in queue
|
||||
if (!enabled)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user