minor changes
This commit is contained in:
		@@ -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)
 | 
			
		||||
@@ -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()
 | 
			
		||||
		Reference in New Issue
	
	Block a user