Quantcast
Channel: JavaScript and TypeScript — Photon Engine
Viewing all articles
Browse latest Browse all 162

Operation 227 - failed, "isConnected" is false , "isClosing" is false

$
0
0
I have a 1 vs 1 multiplayer browser game where I am utilizing Photon Realtime JS SDK. I have a system where I detect other player from leaving the browser tab (with Page Visibility API). Now, I want to make is so that if the other player remains inactive (on the other browser tab) for 10 seconds, he/she will be disconnected.

All works fine, but when I call leaveRoom() on the client that is inactive, I get error "Operation 227 - failed, "isConnected" is false , "isClosing" is false".

Is this because somehow the server already knows that the client is not connected? And what is the workaround?

Viewing all articles
Browse latest Browse all 162

Trending Articles