Skip to content

Commit

Permalink
Fix test on invalid null will topic value in connect packet
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Malinge <[email protected]>
  • Loading branch information
grom-42 committed Nov 4, 2019
1 parent 11dc077 commit fba1f6b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/broker/07-will-null-topic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import struct

from mosq_test_helper import *
from socket import error as SocketError
import errno

rc = 1
keepalive = 60
Expand All @@ -16,6 +18,11 @@
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()
Expand Down

0 comments on commit fba1f6b

Please sign in to comment.