From 094e3926a0ad83d5abb5a478224ae320a6c0bad0 Mon Sep 17 00:00:00 2001 From: ChsBuffer <33744752+chsbuffer@users.noreply.github.com> Date: Fri, 12 Nov 2021 19:34:51 +0800 Subject: [PATCH] Revert "Fix didn't stop Controller when starting Controller" --- Netch/Forms/MainForm.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Netch/Forms/MainForm.cs b/Netch/Forms/MainForm.cs index 7afa52bb..566c2143 100644 --- a/Netch/Forms/MainForm.cs +++ b/Netch/Forms/MainForm.cs @@ -548,11 +548,7 @@ namespace Netch.Forms try { - // "async all the way" - // https://docs.microsoft.com/en-us/archive/msdn-magazine/2013/march/async-await-best-practices-in-asynchronous-programming#async-all-the-way - - // here is a dirty hack because the MainController don't need to switch back to UI thread, let it run in threadpool - await Task.Run(async () => await MainController.StartAsync(server, mode)); + await MainController.StartAsync(server, mode); } catch (Exception exception) {