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

Method CloseTCPConn

testing_internal.go:54–58  ·  view source on GitHub ↗

CloseTCPConn closes the underlying TCP connection. It can be used to simulate a disconnect.

()

Source from the content-addressed store, hash-verified

52// CloseTCPConn closes the underlying TCP connection.
53// It can be used to simulate a disconnect.
54func (nc *Conn) CloseTCPConn() {
55 nc.mu.Lock()
56 defer nc.mu.Unlock()
57 nc.conn.Close()
58}

Callers 1

Calls 1

CloseMethod · 0.45

Tested by 1