From 871ad523fa7d646a822838bf21d51f2dbac3c1ef Mon Sep 17 00:00:00 2001 From: Victor Boivie Date: Wed, 7 Sep 2022 12:40:58 +0000 Subject: [PATCH] dcsctp: Only send packets if there is a TCB This was a mistake from change 273800 in that it could try to send packets if there wasn't a connection established - when tcb_ was nullptr. Bug: chromium:1360268 Change-Id: Idd4406071dbd8ac89303aef61840895505417569 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274405 Reviewed-by: Harald Alvestrand Commit-Queue: Victor Boivie Auto-Submit: Victor Boivie Cr-Commit-Position: refs/heads/main@{#38031} --- net/dcsctp/socket/dcsctp_socket.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/dcsctp/socket/dcsctp_socket.cc b/net/dcsctp/socket/dcsctp_socket.cc index f36e26d777..f831ba090c 100644 --- a/net/dcsctp/socket/dcsctp_socket.cc +++ b/net/dcsctp/socket/dcsctp_socket.cc @@ -1549,10 +1549,11 @@ void DcSctpSocket::HandleReconfig( // (either successfully or with failure). If there still are pending streams // that were waiting for this request to finish, continue resetting them. MaybeSendResetStreamsRequest(); + + // If a response was processed, pending to-be-reset streams may now have + // become unpaused. Try to send more DATA chunks. + tcb_->SendBufferedPackets(now); } - // If a response was processed, pending to-be-reset streams may now have - // become unpaused. Try to send more DATA chunks. - tcb_->SendBufferedPackets(now); } void DcSctpSocket::HandleShutdown(