~netlandish/links-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH links] Fix long delay when shutting down server

Details
Message ID
<20250418185546.1826-1-peter@netlandish.com>
Sender timestamp
1744980941
DKIM signature
missing
Download raw message
Patch: +1 -2
---
 cmd/links/main.go  | 2 +-
 cmd/links/parse.go | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/cmd/links/main.go b/cmd/links/main.go
index 2e26c81..b8d7ade 100644
--- a/cmd/links/main.go
+++ b/cmd/links/main.go
@@ -396,12 +396,12 @@ func run() error {
	)

	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	wg := new(sync.WaitGroup)
	wg.Add(1)
	go parseBaseURLs(ctx, srv, wg.Done)
	srv.Run()
	cancel()

	wg.Wait()
	return nil
diff --git a/cmd/links/parse.go b/cmd/links/parse.go
index 600d8eb..8bec3ff 100644
--- a/cmd/links/parse.go
+++ b/cmd/links/parse.go
@@ -81,7 +81,6 @@ func parseBaseURLs(ctx context.Context, srv *server.Server, done func()) {
	for {
		select {
		case <-ctx.Done():
			cancel()
			fmt.Println("parseBaseURLs: Context canceled, shutting down.")
			return
		case <-ticker.C:
-- 
2.47.2
Details
Message ID
<D99ZZ0FY9IFE.34OHM94QD9H3F@netlandish.com>
In-Reply-To
<20250418185546.1826-1-peter@netlandish.com> (view parent)
Sender timestamp
1744981498
DKIM signature
missing
Download raw message
Applied.

To git@git.code.netlandish.com:~netlandish/links
   c5e10f1..65c83ec  master -> master
Reply to thread Export thread (mbox)