passivbot icon indicating copy to clipboard operation
passivbot copied to clipboard

cc.close() function in finally block

Open Mengflz opened this issue 2 years ago • 1 comments

When I use the forager.py, I find the script will end after running it for an hour. I checked the code. It seems the cc.close() is put in finally block. So the instance will be closed in the second time unless the output of the first run. I think may be you could think of move the cc instance into the loop? Or move the cc.close() to the except block. But in the later situation, I found it need some extra ways to catch the KeyBoardInterrupt Exception.

Mengflz avatar May 29 '23 02:05 Mengflz

Good catch sir. You are right on every account. Just pushed a commit where the ccxt instance is moved to inside the loop.

enarjord avatar May 29 '23 13:05 enarjord