Why python raised an AssertionError on some failed assumption in a ZeroMQ client?

这一生的挚爱 提交于 2019-12-10 00:14:32

问题


My ZeroMQ server ( not published here, written in java ) is set to run only after triggering an event and the ZeroMQ client ( written in python ) is continuously running in background, waiting for server.

For a considerable time period the python client keeps on running properly and then crashes with this error:

Assertion failed: Connection reset by peer (bundled\zeromq\src\signaler.cpp:298)

It happens when the server is not started for a larger time interval.

The client ( python ) app is in the following form

import zmq

context = zmq.Context()
socket  = context.socket( zmq.REQ )

socket.connect( "tcp://localhost:5555" )

socket.send( b"ReadySIG_From_Python_Emitted" )
message = socket.recv()
print( "OrderDetails %s" % ( message ) )

socket.send( b"TERMINATE" )
exit()

来源:https://stackoverflow.com/questions/37962472/why-python-raised-an-assertionerror-on-some-failed-assumption-in-a-zeromq-client

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!