mirror of
https://github.com/eosswedenorg/antelope-api-healthcheck
synced 2026-06-18 05:00:03 +02:00
internal/server/server.go: Adding OnClose()
This commit is contained in:
parent
83fd4826d7
commit
12bd16399b
1 changed files with 10 additions and 0 deletions
|
|
@ -49,6 +49,16 @@ func (s *Server) OnOpen(c gnet.Conn) ([]byte, gnet.Action) {
|
|||
return nil, gnet.None
|
||||
}
|
||||
|
||||
// OnClose callback function
|
||||
//
|
||||
// ---------------------------------------------------------
|
||||
func (s *Server) OnClose(c gnet.Conn, err error) gnet.Action {
|
||||
if err != nil {
|
||||
log.Error("TCP Close", "error", err)
|
||||
}
|
||||
return gnet.None
|
||||
}
|
||||
|
||||
// OnShutdown callback function
|
||||
//
|
||||
// ---------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue