<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Room.onLeave() do not call on connection lost.]]></title><description><![CDATA[<p>When I close client in unexpected way or disable network (like turn on airplane mode on phone) and connetction lost whithout call 'room.Leave()' from client side - the server side room have open client forever ('room.onLeave' do not call and 'room.clients.length' do not change). Any way to handle this?</p>
]]></description><link>http://discuss.colyseus.io/topic/291/room-onleave-do-not-call-on-connection-lost</link><generator>RSS for Node</generator><lastBuildDate>Sun, 08 Mar 2026 20:20:24 GMT</lastBuildDate><atom:link href="http://discuss.colyseus.io/topic/291.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 14 Sep 2019 12:45:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Room.onLeave() do not call on connection lost. on Sat, 14 Sep 2019 12:46:43 GMT]]></title><description><![CDATA[<p>When I close client in unexpected way or disable network (like turn on airplane mode on phone) and connetction lost whithout call 'room.Leave()' from client side - the server side room have open client forever ('room.onLeave' do not call and 'room.clients.length' do not change). Any way to handle this?</p>
]]></description><link>http://discuss.colyseus.io/post/982</link><guid isPermaLink="true">http://discuss.colyseus.io/post/982</guid><dc:creator><![CDATA[dasannikov]]></dc:creator><pubDate>Sat, 14 Sep 2019 12:46:43 GMT</pubDate></item><item><title><![CDATA[Reply to Room.onLeave() do not call on connection lost. on Sat, 14 Sep 2019 13:03:36 GMT]]></title><description><![CDATA[<p>May try to track through room.onStateChange, i.e.<br />
create on the server in a state, let's say the variable MyConnect: true when called</p>
<pre><code>room.onStateChange((state) =&gt; {
				if (state.MyConnect != true) {
				 // Do something ...
				}
            });
</code></pre>
<p>If the connection is terminated, then state.MyConnect will be undefined, which means it will not equal true</p>
]]></description><link>http://discuss.colyseus.io/post/983</link><guid isPermaLink="true">http://discuss.colyseus.io/post/983</guid><dc:creator><![CDATA[lavren1974]]></dc:creator><pubDate>Sat, 14 Sep 2019 13:03:36 GMT</pubDate></item></channel></rss>