MCPcopy Create free account
hub / github.com/PostHog/duckgres / Close

Method Close

tests/integration/latency_proxy.go:45–56  ·  view source on GitHub ↗

Close shuts down the proxy and all active connections.

()

Source from the content-addressed store, hash-verified

43
44// Close shuts down the proxy and all active connections.
45func (p *LatencyProxy) Close() error {
46 p.mu.Lock()
47 p.closed = true
48 conns := p.conns
49 p.conns = nil
50 p.mu.Unlock()
51
52 for _, c := range conns {
53 _ = c.Close()
54 }
55 return p.listener.Close()
56}
57
58func (p *LatencyProxy) acceptLoop() {
59 for {

Callers 1

TestLatencyProxyFunction · 0.95

Calls 1

CloseMethod · 0.65

Tested by 1

TestLatencyProxyFunction · 0.76