Skip to content

Commit 0b51119

Browse files
committed
Optimizing & Bug Fixing
Make github workflow smoother and optimizing websocket
1 parent 13aa4a6 commit 0b51119

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Build and Release dotNet
22

3-
#on: [push]
43
on:
54
push:
5+
branches: [ main ]
66
paths-ignore:
77
- '*.md'
88
- '.github/**'
@@ -114,7 +114,7 @@ jobs:
114114

115115

116116
build-project:
117-
#if: github.event.pull_request.merged == true
117+
if: github.event.pull_request.merged == true
118118
name: Build dotNet
119119
strategy:
120120
matrix:

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Docker Image CI
22

3-
#on: [ push ]
43
on:
54
push:
5+
branches: [ main ]
66
paths-ignore:
77
- '*.md'
88
- '.github/**'

Services/WebSockClient.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ public async void Stop()
149149

150150
private async void ReconnectDelayed(string clientToken)
151151
{
152+
if (ws != null)
153+
await ws!.Stop(WebSocketCloseStatus.Empty, "Connection closing.");
154+
ws = null;
152155
await Task.Delay(10000);
153156
if (!isStopped)
154157
Start(clientToken, true);

0 commit comments

Comments
 (0)