Control Firebase timeout for disconnection
<p>I got an Android application which uses Firebase.</p>

<p>My records there got a field called "status" which is supposed to save the connectivity status to the server.</p>

<p>I got a <code>BroadcastReceiver</code> which identifies when the internet connection to the application is restored and then I update the status field myself and everything is fine in that direction. </p>

<p>I got a problem when the internet connection is lost. It seems to take a long time for Firebase to identify the connection is lost, and the status field is being updated after a long time. The update itself when disconnected is done like this:</p>

<pre><code>child.child("status").onDisconnect().setValue(ClientStatus.OFFLINE);
</code></pre>

<p>This works, but like I said it takes a long time until the <code>onDisconnect()</code> method is actually invoked.</p>

<p>Is there a way to control the timeout for firebase until it decides the connection is lost?</p>