This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
Repositories
Datasets
Forum
实训
竞赛
大数据
应用
Register
Sign In
youys
/
Discord.Net
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
34
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
Close the WebSocket when disconnecting
This
resolves
#224
pull/378/head
Christopher F
8 years ago
parent
8ec80663f0
commit
58291f8199
1 changed files
with
2 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
src/Discord.Net.Core/Net/WebSockets/DefaultWebSocketClient.cs
+ 2
- 0
src/Discord.Net.Core/Net/WebSockets/DefaultWebSocketClient.cs
View File
@@ -101,6 +101,8 @@ namespace Discord.Net.WebSockets
if (_client != null && _client.State == WebSocketState.Open)
{
var token = new CancellationToken();
await _client.CloseAsync(WebSocketCloseStatus.NormalClosure, "", token);
_client.Dispose();
_client = null;
}
Write
Preview
Loading…
Cancel
Save