From 2958161e7f1a823013e55a5a4e3505234c3da903 Mon Sep 17 00:00:00 2001 From: Lev Stipakov Date: Thu, 13 Oct 2022 14:11:33 +0300 Subject: [PATCH] dco-win: add halt check after connection attempt parent->transport_connecting() might trigger stop(), reset device handle and set halt to true if TCP server is down. In this case we should not queue read. Signed-off-by: Lev Stipakov --- openvpn/dco/ovpndcowincli.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openvpn/dco/ovpndcowincli.hpp b/openvpn/dco/ovpndcowincli.hpp index 17427835..71a7047d 100644 --- a/openvpn/dco/ovpndcowincli.hpp +++ b/openvpn/dco/ovpndcowincli.hpp @@ -232,7 +232,9 @@ protected: add_peer_([self=Ptr(this)]() { if (!self->halt) { self->transport_parent->transport_connecting(); - self->queue_read_(); + /* above line might set halt to true in case of TCP reconnect */ + if (!self->halt) + self->queue_read_(); } }); }