Skip to content

Commit

Permalink
feat: add gracefull shutdown to sse-svelte
Browse files Browse the repository at this point in the history
Signed-off-by: Animesh Pathak <[email protected]>
  • Loading branch information
Sonichigo committed Jun 24, 2024
1 parent 6c045c7 commit 6c8b2b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sse-svelte/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"os"
"os/signal"
"time"
"syscall"

Check failure on line 11 in sse-svelte/main.go

View workflow job for this annotation

GitHub Actions / lint (sse-svelte)

File is not `gofmt`-ed with `-s` (gofmt)

"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
Expand Down Expand Up @@ -113,7 +114,7 @@ func main() {

// Channel to listen for interrupt signals
stop := make(chan os.Signal, 1)
signal.Notify(stop, os.Interrupt, os.Kill)
signal.Notify(stop, os.Interrupt, syscall.SIGTERM)

// Run the server in a goroutine
go func() {
Expand Down

0 comments on commit 6c8b2b1

Please sign in to comment.