Skip to content

Commit

Permalink
adjust to new playground behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdata committed Aug 15, 2024
1 parent 6f0e860 commit f5dc1b7
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"flag"
"log/slog"
"net/http"
"syscall"
"time"

"github.com/linkdata/webserv"
)
Expand All @@ -18,14 +16,6 @@ var (
flagDataDir = flag.String("datadir", "$HOME", "where to store data files after startup")
)

// make sure we don't time out on the Go playground
func dontTimeOutOnGoPlayground() {
go func() {
time.Sleep(time.Second)
syscall.Kill(syscall.Getpid(), syscall.SIGINT)
}()
}

func Example() {
flag.Parse()

Expand All @@ -43,7 +33,6 @@ func Example() {

l, err := cfg.Listen()
if err == nil {
dontTimeOutOnGoPlayground()
err = cfg.Serve(context.Background(), l, nil)
}
slog.Error(err.Error())
Expand Down

0 comments on commit f5dc1b7

Please sign in to comment.