MCPcopy Index your code
hub / github.com/Monibuca/engine / close

Method close

io.go:101–114  ·  view source on GitHub ↗
(err StopError)

Source from the content-addressed store, hash-verified

99}
100
101func (i *IO) close(err StopError) bool {
102 if i.IsClosed() {
103 i.Debug("already closed", err...)
104 return false
105 }
106 i.Info("close", err...)
107 if i.CancelCauseFunc != nil {
108 i.CancelCauseFunc(err)
109 }
110 if i.Closer != nil {
111 i.Closer.Close()
112 }
113 return true
114}
115
116// Stop 停止订阅或者发布,由订阅者或者发布者调用
117func (io *IO) Stop(reason ...zapcore.Field) {

Callers 2

OnEventMethod · 0.95
StopMethod · 0.95

Calls 4

IsClosedMethod · 0.95
DebugMethod · 0.65
InfoMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected