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:
James Frowen 2020-05-03 14:12:32 +01:00 committed by GitHub
parent ff4a576b13
commit 7de3c74614
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
}
}