Skip to content

Commit 7778780

Browse files
authored
cmd/geth: fix js unclean shutdown (#22302)
1 parent 08c878a commit 7778780

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

cmd/geth/consolecmd.go

+2-7
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ package main
1919
import (
2020
"fmt"
2121
"os"
22-
"os/signal"
2322
"path/filepath"
2423
"strings"
25-
"syscall"
2624

2725
"github.com/ethereum/go-ethereum/cmd/utils"
2826
"github.com/ethereum/go-ethereum/console"
@@ -218,13 +216,10 @@ func ephemeralConsole(ctx *cli.Context) error {
218216
utils.Fatalf("Failed to execute %s: %v", file, err)
219217
}
220218
}
221-
// Wait for pending callbacks, but stop for Ctrl-C.
222-
abort := make(chan os.Signal, 1)
223-
signal.Notify(abort, syscall.SIGINT, syscall.SIGTERM)
224219

225220
go func() {
226-
<-abort
227-
os.Exit(0)
221+
stack.Wait()
222+
console.Stop(false)
228223
}()
229224
console.Stop(true)
230225

0 commit comments

Comments
 (0)