]> git.deb.at Git - rhonda/impostor.hazel.git/commitdiff
Added exception catch
authorJamJar00 <jamster.30@btinternet.com>
Sun, 1 May 2016 22:50:08 +0000 (23:50 +0100)
committerJamJar00 <jamster.30@btinternet.com>
Sun, 1 May 2016 22:50:08 +0000 (23:50 +0100)
Hazel/UdpClientConnection.cs

index b5516c49fa589c34ef8a99706d3aff991fb80652..000e8038df6f331b68c4a0d32badf2c561e6917c 100644 (file)
@@ -188,6 +188,10 @@ namespace Hazel
             {
                 HandleDisconnect(new HazelException("A Socket exception occured while initiating a receive operation.", e));
             }
+            catch (ObjectDisposedException)
+            {
+                throw new HazelException("Could not begin read as the socket has been disposed of.");
+            }
             
             if (buffer != null)
                 InvokeDataReceived(new DataEventArgs(buffer, sendOption));