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 8256433 commit 1e34f3dCopy full SHA for 1e34f3d
examples/signal/send/receiver/main.go
@@ -26,12 +26,11 @@ var (
26
27
func main() {
28
var (
29
- mainCtx = context.Background()
30
- procCtx, procCxl = context.WithTimeout(mainCtx, 10*time.Second)
+ mainCtx = context.Background()
+ procCtx, procCxl = context.WithTimeout(mainCtx, 10*time.Second)
31
+ signalCtx, signalCxl = signal.NotifyContext(procCtx, syscall.SIGTERM)
32
)
33
defer procCxl()
-
34
- signalCtx, signalCxl := signal.NotifyContext(procCtx, syscall.SIGTERM)
35
defer signalCxl()
36
37
appLog.Println("wait for SIGTERM")
0 commit comments