From 602c8e068b50b8ed1a2686b7bff4b6a9efc1491d Mon Sep 17 00:00:00 2001 From: xiongguangjie Date: Sat, 27 Aug 2022 13:25:23 +0800 Subject: [PATCH] srt handshake packet send 3 times --- srt/SrtTransport.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/srt/SrtTransport.cpp b/srt/SrtTransport.cpp index 3c663055..dd6cc5a1 100644 --- a/srt/SrtTransport.cpp +++ b/srt/SrtTransport.cpp @@ -143,7 +143,9 @@ void SrtTransport::handleHandshakeInduction(HandshakePacket &pkt, struct sockadd if (_handleshake_res) { if(isSameCon(pkt)){ TraceL << getIdentifier() <<" Induction repeate "<storeToData(); registerSelfHandshake(); - sendControlPacket(res, true); + for(int i=0;i<3;++i){ + sendControlPacket(res, true); + } } void SrtTransport::handleHandshakeConclusion(HandshakePacket &pkt, struct sockaddr_storage *addr) { @@ -240,7 +244,9 @@ void SrtTransport::handleHandshakeConclusion(HandshakePacket &pkt, struct sockad _handleshake_res = res; unregisterSelfHandshake(); registerSelf(); - sendControlPacket(res, true); + for(int i=0;i<3;++i){ + sendControlPacket(res, true); + } TraceL << " buf size = " << res->max_flow_window_size << " init seq =" << _init_seq_number << " latency=" << delay; _recv_buf = std::make_shared(getPktBufSize(), _init_seq_number, delay * 1e3,srt_flag); @@ -251,7 +257,9 @@ void SrtTransport::handleHandshakeConclusion(HandshakePacket &pkt, struct sockad } else { if(isSameCon(pkt)){ TraceL << getIdentifier() <<" CONCLUSION repeate "<