From 9115b88f449e8f0778deffd6e17bffd3f6e6b80b Mon Sep 17 00:00:00 2001 From: Thomas Debrunner Date: Mon, 11 Dec 2023 18:50:38 +0100 Subject: [PATCH] Network: catch interruptexception by reference --- include/mav/Network.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mav/Network.h b/include/mav/Network.h index 2751e41..90b5fa6 100644 --- a/include/mav/Network.h +++ b/include/mav/Network.h @@ -256,7 +256,7 @@ namespace mav { _expireConnection(connection.second, std::make_exception_ptr(e)); } } - } catch (NetworkInterfaceInterrupt) { + } catch (NetworkInterfaceInterrupt&) { _should_terminate.store(true); } } @@ -290,7 +290,7 @@ namespace mav { _expireConnection(connection.second, std::make_exception_ptr(e)); } } - } catch (NetworkInterfaceInterrupt) { + } catch (NetworkInterfaceInterrupt&) { _should_terminate.store(true); }