docs: def _unregister_socket(s):
          '''
          Internal method used to remove the socket from AppLayer registry.
          Warns if the "upward" socket queue has any left-over data.  
          '''
          with _lock:
              sock_queue = ApplicationLayer._to_app.pop(s._sockid())
          if not sock_queue.empty():
              log_warn("Socket being destroyed still has data enqueued for application layer.")