@ctx.call_on_close
def _shutdown_server_thread():
    stop_signal.set()
    background.join()
    timer.stop_with_message()
@ctx.call_on_close
def _shutdown_server_thread():
    stop_signal.set()
    background.join()
    timer.stop_with_message()