mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-23 00:24:47 +08:00
Fix test on invalid null will topic value in connect packet
Signed-off-by: Jerome Malinge <gromgromm@yahoo.com>
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
import struct
|
||||
|
||||
from mosq_test_helper import *
|
||||
from socket import error as SocketError
|
||||
import errno
|
||||
|
||||
rc = 1
|
||||
keepalive = 60
|
||||
@@ -16,6 +18,11 @@ try:
|
||||
sock = mosq_test.do_client_connect(connect_packet, b"", timeout=30, port=port)
|
||||
rc = 0
|
||||
sock.close()
|
||||
except SocketError as e:
|
||||
if e.errno == errno.ECONNRESET:
|
||||
# Connection has been closed by peer (very quickly).
|
||||
# Fine, this is the expected behavior.
|
||||
rc = 0
|
||||
finally:
|
||||
broker.terminate()
|
||||
broker.wait()
|
||||
|
||||
Reference in New Issue
Block a user