1
0
Fork 0
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:
Henrik Hautakoski 2023-02-06 12:52:13 +01:00
parent 83fd4826d7
commit 12bd16399b
No known key found for this signature in database
GPG key ID: 217490840C18A5D9

View file

@ -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
//
// ---------------------------------------------------------