title: Is it possible to subscribe to the Firebase onDisconnect() event from more than one location in the database?
body: <p>In an application where clients are connected to a <strong>Firebase Realtime Database</strong>, is it possible and/or bad practice to have more than one subscription to the <code>onDisconnect()</code> event in order to update more than one location in my database?</p>
  
  <p>So for example, in addition to the following:</p>
  
  <pre><code>firebase.database().ref(`users/${uid}`).onDisconnect().update({
    state: 'offline'
  })
  </code></pre>
  
  <p>I'd like to also update additional data elsewhere like so:</p>
  
  <pre><code>firebase.database().ref(`rooms/${uid}`).onDisconnect().update({
    available: false
  });
  </code></pre>
  
  <p>I have tested this and it does work, but there is nothing in the Firebase documentation regarding multiple subscriptions in this way.</p>
  
  <p>I also realize that I could use a Firebase Cloud Function to achieve the same thing, but is the above an acceptable approach?</p>