minor changes

This commit is contained in:
Torma Kristóf 2021-04-25 12:23:17 +02:00
parent 435cb07f63
commit 0c11b0293c
2 changed files with 4 additions and 2 deletions

View File

@ -16,6 +16,7 @@ try:
while True:
m = socket.recv_string()
DATETIMES.append(datetime.now())
except Exception:
except Exception as e:
print(e)
socket.close()
print(DATETIMES)

View File

@ -9,9 +9,10 @@ context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.bind("tcp://127.0.0.1:5559")
n = 10
msg_body = "a" * n
try:
while True:
msg_body = "a" * m
socket.send_string(f"test {msg_body}")
except Exception:
socket.close()