From 1d8807a6ba880bf330cedf51bfb2fbe88bb15513 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 30 Nov 2016 14:51:26 -0500 Subject: [PATCH] handle async_receive_from errors --- SSU.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/SSU.cpp b/SSU.cpp index 72091e00..c5f64709 100644 --- a/SSU.cpp +++ b/SSU.cpp @@ -207,8 +207,12 @@ namespace transport } else { - LogPrint (eLogError, "SSU: receive error: ", ecode.message ()); delete packet; + if (ecode != boost::asio::error::operation_aborted) + { + LogPrint (eLogError, "SSU: receive error: ", ecode.message ()); + Receive (); + } } } @@ -234,8 +238,12 @@ namespace transport } else { - LogPrint (eLogError, "SSU: v6 receive error: ", ecode.message ()); delete packet; + if (ecode != boost::asio::error::operation_aborted) + { + LogPrint (eLogError, "SSU: v6 receive error: ", ecode.message ()); + ReceiveV6 (); + } } }