added cancel flag
removed duplicate logic in process client
Merge pull request #158 from spottradingllc/feature-cancel

Cancel current running task