From 71beae5923d91a32c78142072304d88b10f6de5a Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Tue, 30 Mar 2021 13:12:42 -0300 Subject: [PATCH] Stop retransmit timer when destroying a connection Otherwise we segfault because it outlives the Connection. --- llarp/quic/connection.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llarp/quic/connection.cpp b/llarp/quic/connection.cpp index fb6293b4b..8bad9a11d 100644 --- a/llarp/quic/connection.cpp +++ b/llarp/quic/connection.cpp @@ -532,6 +532,11 @@ namespace llarp::quic { if (io_trigger) io_trigger->close(); + if (retransmit_timer) + { + retransmit_timer->stop(); + retransmit_timer->close(); + } } void