jjzjj

accomplished

全部标签

Python + ZMQ : Operation cannot be accomplished in current state

我试图让一个python程序通过zeromq使用请求-回复模式与另一个python程序通信。客户端程序应向服务器程序发送请求,服务器程序进行回复。我有两台服务器,当一台服务器出现故障时,另一台服务器接管。当第一台服务器工作时,通信工作完美,但是,当第一台服务器发生故障并且当我向第二台服务器发出请求时,我看到错误:zmp.error.ZMQError:Operationcannotbeaccomplishedincurrentstate服务器1的代码:#RuntheserverwhileTrue:#Definethesocketusingthe"Context"sock=context.