Content-Length: 319225 | pFad | http://github.com/coder/coder/commit/268a50c193a266281c0f2a0764bdc4a710d9740e

A5 feat(agent/agentcontainers): add file watcher and dirty status (#17573) · coder/coder@268a50c · GitHub
Skip to content

Commit 268a50c

Browse files
authored
feat(agent/agentcontainers): add file watcher and dirty status (#17573)
Fixes coder/internal#479 Fixes coder/internal#480
1 parent b6146df commit 268a50c

File tree

12 files changed

+909
-47
lines changed

12 files changed

+909
-47
lines changed

agent/agent.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,8 +1481,13 @@ func (a *agent) createTailnet(
14811481
}()
14821482
if err = a.trackGoroutine(func() {
14831483
defer apiListener.Close()
1484+
apiHandler, closeAPIHAndler := a.apiHandler()
1485+
defer func() {
1486+
_ = closeAPIHAndler()
1487+
}()
14841488
server := &http.Server{
1485-
Handler: a.apiHandler(),
1489+
BaseContext: func(net.Listener) context.Context { return ctx },
1490+
Handler: apiHandler,
14861491
ReadTimeout: 20 * time.Second,
14871492
ReadHeaderTimeout: 20 * time.Second,
14881493
WriteTimeout: 20 * time.Second,
@@ -1493,6 +1498,7 @@ func (a *agent) createTailnet(
14931498
case <-ctx.Done():
14941499
case <-a.hardCtx.Done():
14951500
}
1501+
_ = closeAPIHAndler()
14961502
_ = server.Close()
14971503
}()
14981504

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/coder/coder/commit/268a50c193a266281c0f2a0764bdc4a710d9740e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy