From 757fb9db97e23b89eaf36c6c8bb46d340c4f0e67 Mon Sep 17 00:00:00 2001 From: fawce Date: Wed, 28 Mar 2012 11:30:39 -0400 Subject: [PATCH] fixed logic for timeouts on order. timeouts are not necessarily fatal. --- zipline/finance/trading.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/zipline/finance/trading.py b/zipline/finance/trading.py index e70c278b..200a50d5 100644 --- a/zipline/finance/trading.py +++ b/zipline/finance/trading.py @@ -214,12 +214,10 @@ class OrderDataSource(qmsg.DataSource): #no more orders, should this be an error condition? if len(rlist) == 0 or len(xlist) > 0: - #no order message means there was a timeout above, - #and the client is done sending orders (but isn't - #telling us himself!). - qutil.LOGGER.warn("signaling orders done on timeout.") - self.signal_done() - return + # no order message means there was a timeout above. + # this is an indeterminant case, we don't know the cause. + # the safest move is to break out of this loop and try again + break order_msg = rlist[0].recv()