From 4d70f0908e2cddad07463c8260500038d34926d0 Mon Sep 17 00:00:00 2001 From: Denis Tereshkin Date: Mon, 22 Mar 2021 21:35:29 +0700 Subject: [PATCH] Bugfix: use updated config if configUpdate callback is specified --- src/ATrade/Driver/Real.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ATrade/Driver/Real.hs b/src/ATrade/Driver/Real.hs index 7c3022f..8a57fd9 100644 --- a/src/ATrade/Driver/Real.hs +++ b/src/ATrade/Driver/Real.hs @@ -229,7 +229,7 @@ robotMain dataDownloadDelta defaultState initCallback callback = do let strategy = mkBarStrategy instanceParams dataDownloadDelta updatedConfig stratState callback stateRef <- newIORef stratState - configRef <- newIORef config + configRef <- newIORef updatedConfig timersRef <- newIORef timersState shutdownMv <- newEmptyMVar installHandler sigINT (gracefulShutdown params stateRef timersRef shutdownMv)