MCPcopy Create free account
hub / github.com/cloudwego/netpoll / initFinalizer

Method initFinalizer

connection_impl.go:424–434  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

422}
423
424func (c *connection) initFinalizer() {
425 c.AddCloseCallback(func(connection Connection) (err error) {
426 c.stop(flushing)
427 c.operator.Free()
428 if err = c.netFD.Close(); err != nil {
429 logger.Printf("NETPOLL: netFD close failed: %v", err)
430 }
431 c.closeBuffer()
432 return nil
433 })
434}
435
436func (c *connection) triggerRead(err error) {
437 select {

Callers 1

initMethod · 0.95

Calls 5

AddCloseCallbackMethod · 0.95
closeBufferMethod · 0.95
stopMethod · 0.80
FreeMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected