Fix test on invalid null will topic value in connect packet

Signed-off-by: Jerome Malinge <gromgromm@yahoo.com>
pull/1487/head
Jerome Malinge 6 years ago
parent 11dc077d15
commit fba1f6bc0a

@ -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()

Loading…
Cancel
Save