Skip to content

Commit

Permalink
Merge pull request #155 from sonroyaalmerol/fix-init
Browse files Browse the repository at this point in the history
remove sigterm ctx
  • Loading branch information
sonroyaalmerol authored Feb 11, 2025
2 parents 4387aa1 + 6355f67 commit b459c09
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions cmd/pbs_plus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ import (
"net/http"
"os"
"os/exec"
"os/signal"
"path/filepath"
"strings"
"syscall"
"time"

"github.com/sonroyaalmerol/pbs-plus/internal/auth/certificates"
Expand All @@ -36,9 +34,6 @@ import (
var Version = "v0.0.0"

func main() {
sigCtx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
defer stop() // Stop forwarding signals when the context is canceled.

err := syslog.InitializeLogger()
if err != nil {
log.Fatalf("Failed to initialize logger: %s", err)
Expand All @@ -51,7 +46,7 @@ func main() {
var wsHub *websockets.Server
wsHub = nil

ctx, cancel := context.WithCancel(sigCtx)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
if *jobRun == "" {
wsHub = websockets.NewServer(ctx)
Expand Down

0 comments on commit b459c09

Please sign in to comment.