MCPcopy
hub / github.com/nats-io/nats.go / waitForExits

Method waitForExits

nats.go:2446–2455  ·  view source on GitHub ↗

waitForExits will wait for all socket watcher Go routines to be shutdown before proceeding.

()

Source from the content-addressed store, hash-verified

2444// waitForExits will wait for all socket watcher Go routines to
2445// be shutdown before proceeding.
2446func (nc *Conn) waitForExits() {
2447 // Kick old flusher forcefully.
2448 select {
2449 case nc.fch <- struct{}{}:
2450 default:
2451 }
2452
2453 // Wait for any previous go routines.
2454 nc.wg.Wait()
2455}
2456
2457// ForceReconnect forces a reconnect attempt to the server.
2458// This is a non-blocking call and will start the reconnect

Callers 1

doReconnectMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected