-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
market: remove resume option from Suspend
Resuming a market is now done by starting Run again. Modify SubmitOrderAsync to prevent hangs on orders sent to a suspended market. First it denies orders to a stopped market, then attempts to on the buffered orderRouter channel, and if it is blocking it fires off a goroutine with a 5 second timeout. The Market's Run cleanup defer now drains the orderRouter channel before returning in case orders were send on the orderRouter channel before the running channel began blocking them in SubmitOrderAsync.
- Loading branch information
Showing
4 changed files
with
123 additions
and
158 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.