Problem in ConnectionHandler class
I tried many times, and sometimes the program will stuck and I think this is because self.sock.recv() dose not received message. Any method to solve this problem?
class ConnectionHandler: def init(self): signal(SIGPIPE, SIG_DFL) self.sock = zmq.Context().socket(zmq.REQ) self.sock.connect("tcp://125.0.0.1:5556")
def __call__(self, data):
self.sock.send_string(json.dumps(data))
recieved = json.loads(str(self.sock.recv(), "utf-8"), encoding='utf-8', strict=False)
recieved = [(row[0]['tgt'], row[0]['pred_score'], row[0]['src']) for row in recieved]
return get_with_answers(recieved)
I too have this issue, was able to get the setup to run but it would hang on test output, probably waiting for a return message that is never received. I doubt it's a problem with the class, I know the ports that are showing in docker ps for the corenlp container is just 9000 I'm not sure if that means anything
-- Edit: After some digging that port is supposed to be 9000, I'm using windows subsystem for linux so I'm going to try and see if there's anything firewalled.