MCPcopy
hub / github.com/cortexlabs/cortex / closeConnection

Function closeConnection

cli/cluster/logs.go:152–162  ·  view source on GitHub ↗
(connection *websocket.Conn, done chan struct{}, interrupt chan os.Signal)

Source from the content-addressed store, hash-verified

150}
151
152func closeConnection(connection *websocket.Conn, done chan struct{}, interrupt chan os.Signal) {
153 for {
154 select {
155 case <-done:
156 return
157 case <-interrupt:
158 connection.WriteMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, ""))
159 return
160 }
161 }
162}

Callers 1

streamLogsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected