From ac3f207472dc29e3bd095750500dd879aff52b8f Mon Sep 17 00:00:00 2001 From: Darren Perry Date: Wed, 15 May 2019 15:21:16 +0100 Subject: [PATCH] Catch ThreadInterruptedExceptions in Server.cs when closing stream/client in SendLoop --- Telepathy/Server.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Telepathy/Server.cs b/Telepathy/Server.cs index 545f0c4..87560be 100644 --- a/Telepathy/Server.cs +++ b/Telepathy/Server.cs @@ -116,6 +116,13 @@ void Listen(int port) // through to here when aborting. don't show an // error.) } + catch (ThreadInterruptedException) + { + // happens if receive thread interrupts send thread. don't log anything. + // (we catch it in SendLoop too, but it still gets + // through to here when aborting. don't show an + // error.) + } catch (Exception exception) { Logger.LogError("Server send thread exception: " + exception);