code: def on_disconnected(self):
          
  
          with self._handover_cond:
  
              # Wait until receiver has processed the previous notification
              while len(self._handover_dict) > 0:
                  self._handover_cond.wait(self._wait_timeout)
  
              # Indicate to receiver that there is a termination notification
              self._handover_dict['headers'] = None  # terminate receiver
              self._handover_dict['message'] = None
              self._handover_cond.notifyAll()
docs: Event method that gets called when the JMS session has been
          disconnected.
  
          It hands over a termination notification (headers and message are
          None).