'Shuts down the TFTP service.'

@blocking_call_on_reactor_thread
def shutdown(self):

    self.cancel_all_pending_tasks()
    if self._endpoint:
        self._endpoint.stop_listen_to(self._prefix)
        self._endpoint = None
    self._session_id_dict = None
    self._session_dict = None
    self._is_running = False
