add comment

This commit is contained in:
vis2k 2021-06-02 11:22:50 +08:00
parent 456e098544
commit a2c7a7e60d

View File

@ -181,6 +181,12 @@ public override void Disconnect()
// (might be client or host mode here)
isReady = false;
Transport.activeTransport.ServerDisconnect(connectionId);
// IMPORTANT: NetworkConnection.Disconnect() is NOT called for
// voluntary disconnects from the other end.
// -> so all 'on disconnect' cleanup code needs to be in
// OnTransportDisconnect, where it's called for both voluntary
// and involuntary disconnects!
RemoveFromObservingsObservers();
}
}