Skip to content

Commit

Permalink
fix: Prevent calling the main process exit without WithOnClose()
Browse files Browse the repository at this point in the history
Signed-off-by: attlee-wang <wangdong102425@gmail.com>
  • Loading branch information
wangdong.attleewang authored and attlee-wang committed Sep 10, 2024
1 parent 53760d4 commit 49114f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/stub/stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
stdnet "net"
"os"
"path/filepath"
"runtime"
"strconv"
"sync"
"time"
Expand Down Expand Up @@ -543,7 +544,7 @@ func (stub *stub) connClosed() {
return
}

os.Exit(0)
runtime.Goexit() //The exit code can be determined when the coroutine exits
}

//
Expand Down

0 comments on commit 49114f6

Please sign in to comment.