MCPcopy Create free account
hub / github.com/cloudbase/garm / Stop

Method Stop

websocket/client.go:104–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102}
103
104func (c *Client) Stop() {
105 c.mux.Lock()
106 defer c.mux.Unlock()
107
108 if !c.running {
109 return
110 }
111
112 c.running = false
113 c.consumer.Close()
114 c.writeMessage(websocket.CloseMessage, websocket.FormatCloseMessage(websocket.CloseNormalClosure, ""))
115 c.conn.Close()
116 close(c.send)
117 close(c.done)
118}
119
120func (c *Client) Done() <-chan struct{} {
121 return c.done

Callers 4

clientReaderMethod · 0.95
clientWriterMethod · 0.95
runWatcherMethod · 0.95
EventsHandlerMethod · 0.95

Calls 4

writeMessageMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected