We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3135f7 commit 3f2f269Copy full SHA for 3f2f269
src/StreamDemuxer.cs
@@ -1,6 +1,7 @@
1
using System;
2
using System.Buffers;
3
using System.Collections.Generic;
4
+using System.Diagnostics;
5
using System.IO;
6
using System.Net.WebSockets;
7
using System.Threading;
@@ -29,10 +30,18 @@ public void Start()
29
30
31
public void Dispose()
32
{
- if (this.runLoop != null)
33
+ try
34
+ {
35
+ if (this.runLoop != null)
36
37
+ this.cts.Cancel();
38
+ this.runLoop.Wait();
39
+ }
40
41
+ catch (Exception ex)
42
- this.cts.Cancel();
- this.runLoop.Wait();
43
+ // Dispose methods can never throw.
44
+ Debug.Write(ex);
45
}
46
47
0 commit comments