Most often this is result of not waiting on proper callbacks.
OnNetworkConnect is sent out when the connection gets established, for example. Some people call Connect() then immediately start on game logic, not realizing that Connect() is a delayed call. Same with others. When you Disconnect() you need to wait for OnNetworkDisconnect() before doing anything. Joining a channel too -- you must wait for OnNetworkConnect, do the join channel operation, then wait for OnNetworkJoinChannel.