diff options
author | Victor Boivie <boivie@webrtc.org> | 2021-05-07 10:56:52 +0200 |
---|---|---|
committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2021-05-07 13:51:57 +0000 |
commit | f95536dd5a39e7bef6ddcd2f507a63064e07c8cc (patch) | |
tree | 22a22eb2db0b08ea7661f2b607b888a753503b49 /net/dcsctp/socket/dcsctp_socket.cc | |
parent | f2e581a74009acebde290f17768bc8dd4c02d7ff (diff) | |
download | webrtc-f95536dd5a39e7bef6ddcd2f507a63064e07c8cc.tar.gz |
dcsctp: Stop connection timers during shutdown
If Shutdown is called when the socket is being established and while the
connection timers are running, it will put the socket in an inconsistent
state, which is verified in debug builds.
Bug: webrtc:12614
Change-Id: I66f07d1170ac8f0ad9fd485d77d6aef4c365f150
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217765
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33949}
Diffstat (limited to 'net/dcsctp/socket/dcsctp_socket.cc')
-rw-r--r-- | net/dcsctp/socket/dcsctp_socket.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dcsctp/socket/dcsctp_socket.cc b/net/dcsctp/socket/dcsctp_socket.cc index dd54317718..622f6ecfcf 100644 --- a/net/dcsctp/socket/dcsctp_socket.cc +++ b/net/dcsctp/socket/dcsctp_socket.cc @@ -280,6 +280,8 @@ void DcSctpSocket::Shutdown() { // endpoint enters the SHUTDOWN-PENDING state and remains there until all // outstanding data has been acknowledged by its peer." SetState(State::kShutdownPending, "Shutdown called"); + t1_init_->Stop(); + t1_cookie_->Stop(); MaybeSendShutdownOrAck(); } else { // Connection closed before even starting to connect, or during the initial |