From 6150ae6560712e73395e813d436454d50dfbbfe6 Mon Sep 17 00:00:00 2001 From: Norbert Heusser Date: Thu, 21 Apr 2022 15:11:48 +0000 Subject: [PATCH] Remove mosquitto__set_state after error from send__connect in mosquitto__reconnect to fix failing test test/lib/02-subscribe-qos1.py $@/02-subscribe-qos1-async2.test Signed-off-by: Norbert Heusser --- lib/connect.c | 1 - test/lib/Makefile | 2 +- test/mosq_test.py | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/connect.c b/lib/connect.c index d6982933..58e7c53c 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -230,7 +230,6 @@ static int mosquitto__reconnect(struct mosquitto *mosq, bool blocking) if(rc){ packet__cleanup_all(mosq); net__socket_close(mosq); - mosquitto__set_state(mosq, mosq_cs_new); } } return rc; diff --git a/test/lib/Makefile b/test/lib/Makefile index c6796bd9..2405fb26 100644 --- a/test/lib/Makefile +++ b/test/lib/Makefile @@ -39,7 +39,7 @@ c : test-compile ./02-subscribe-qos0.py $@/02-subscribe-qos0.test ./02-subscribe-qos1.py $@/02-subscribe-qos1.test ./02-subscribe-qos1.py $@/02-subscribe-qos1-async1.test -# ./02-subscribe-qos1.py $@/02-subscribe-qos1-async2.test + ./02-subscribe-qos1.py $@/02-subscribe-qos1-async2.test ./02-subscribe-qos2.py $@/02-subscribe-qos2.test ./02-unsubscribe-multiple-v5.py $@/02-unsubscribe-multiple-v5.test ./02-unsubscribe-v5.py $@/02-unsubscribe-v5.test diff --git a/test/mosq_test.py b/test/mosq_test.py index 11c232dc..b068074d 100644 --- a/test/mosq_test.py +++ b/test/mosq_test.py @@ -14,7 +14,6 @@ import atexit vg_index = 1 vg_logfiles = [] - class TestError(Exception): def __init__(self, message="Mismatched packets"): self.message = message