From: Matt Joiner Date: Wed, 9 Apr 2025 00:03:44 +0000 (+1000) Subject: cmd/torrent: Remove redundant signal notification X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6e04254d9691018fde92af726f5d37fc55e3380b;p=btrtrc.git cmd/torrent: Remove redundant signal notification --- diff --git a/cmd/torrent/download.go b/cmd/torrent/download.go index e3cbdf5f..0a7f991f 100644 --- a/cmd/torrent/download.go +++ b/cmd/torrent/download.go @@ -8,10 +8,8 @@ import ( "net" "net/http" "os" - "os/signal" "strings" "sync" - "syscall" "time" "github.com/anacrolix/log" @@ -350,9 +348,6 @@ func downloadErr(ctx context.Context, flags downloadFlags) error { clientConfig.MaxUnverifiedBytes = flags.MaxUnverifiedBytes.Int64() } - ctx, cancel := signal.NotifyContext(ctx, os.Interrupt, syscall.SIGTERM) - defer cancel() - client, err := torrent.NewClient(clientConfig) if err != nil { return fmt.Errorf("creating client: %w", err)