Skip to content

Commit

Permalink
fix issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
AutoCoder committed Mar 9, 2016
1 parent fc60be0 commit eb16769
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ x64/*
/boost_1_60_0
android_client/gen/*
android_client/bin/*
bug_backup/
3 changes: 2 additions & 1 deletion src/AutoTrader/ClientSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ bool ClientSession::ExecutePendingOrder(){
while (m_isTrading.load()){
Order ord;
WaitAndPopCurrentOrder(ord);//blocking

if (m_ReleaseingCtpAccount)
break;
//if socket command set m_isTrading = false here. this function will quit.
if (m_isTrading.load()){ //Check this bool var again, prevent to execute new pushed order after user stop trade.
m_trade_spi->CancelOrder(ord.GetTriggerTick(), 6, ord.GetInstrumentId());
Expand Down

0 comments on commit eb16769

Please sign in to comment.