From a7bb4b53d85ee79a6609418fa5a1a65880f8a3ad Mon Sep 17 00:00:00 2001 From: Jonathan Kamens Date: Tue, 21 Aug 2012 13:53:03 -0400 Subject: [PATCH] Close the results socket to ensure messages are sent --- zipline/lines.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zipline/lines.py b/zipline/lines.py index 1c3a558f..d31c47d6 100644 --- a/zipline/lines.py +++ b/zipline/lines.py @@ -172,6 +172,8 @@ class SimulatedTrading(object): def close(self): log.info("Closing Simulation: {id}".format(id=self.sim_id)) + if self.results_socket: + self.results_socket.close() if self.proc and self.send_sighup: ppid = os.getppid() if self.success: