'Called by the ClientConnection we are using to notify us of disconnect.'

def _notify_disconnected(self):

    if (self._document is not None):
        self._document.remove_on_change(self)
        self._callbacks.remove_all_callbacks()
