Merge pull request #236 from Azaezel/alpha40_connectionCleanup

client cleanups
This commit is contained in:
Brian Roberts 2020-07-26 18:03:15 -05:00 committed by GitHub
commit 70ea856574
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,12 +104,12 @@ function disconnect()
// else physics resources will not cleanup properly.
physicsStopSimulation( "client" );
disconnectedCleanup();
// Delete the connection if it's still there.
if (isObject(ServerConnection))
ServerConnection.delete();
disconnectedCleanup();
// Call destroyServer in case we're hosting
destroyServer();
}