From 123f5ea5bbbd22b9f1f43246e5eb608cfd334480 Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch> Date: Fri, 20 Jul 2018 18:09:37 +0200 Subject: [PATCH] Set _transferState immediately to prevent race conditions --- ATxService/RoboCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ATxService/RoboCommand.cs b/ATxService/RoboCommand.cs index 35369b5..143740c 100644 --- a/ATxService/RoboCommand.cs +++ b/ATxService/RoboCommand.cs @@ -116,9 +116,9 @@ namespace ATxService if (_transferState != TxState.Active) return; + _transferState = TxState.Paused; Log.Info("Pausing the active transfer..."); _roboCommand.Pause(); - _transferState = TxState.Paused; Log.Debug("Transfer paused"); } -- GitLab