diff --git a/xtransmit/misc.cpp b/xtransmit/misc.cpp index 1bf6a55..11420fc 100644 --- a/xtransmit/misc.cpp +++ b/xtransmit/misc.cpp @@ -30,7 +30,7 @@ shared_sock_t create_connection(const vector& parsed_urls, shared_soc listening_sock = make_shared(parsed_urls); socket::srt_group* s = dynamic_cast(listening_sock.get()); const bool accept = s->mode() == socket::srt_group::LISTENER; - if (accept) { + if (accept && !is_listening) { s->listen(); } shared_sock_t connection = accept ? s->accept() : s->connect();