From f5dc1b7ea0c7e770d1dbba98c7c4c43fb5752070 Mon Sep 17 00:00:00 2001 From: Johan Lindh Date: Thu, 15 Aug 2024 10:54:20 +0200 Subject: [PATCH] adjust to new playground behaviour --- example_test.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/example_test.go b/example_test.go index 5be2582..f7992ee 100644 --- a/example_test.go +++ b/example_test.go @@ -5,8 +5,6 @@ import ( "flag" "log/slog" "net/http" - "syscall" - "time" "github.com/linkdata/webserv" ) @@ -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() @@ -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())