temporary solution for deadlock when sending multiple packets in a listener