From 0dc2924db229f6707ba0a1108194b3cfe62d7ac5 Mon Sep 17 00:00:00 2001 From: David_zdw Date: Mon, 21 Oct 2024 17:15:32 +0800 Subject: [PATCH 1/2] fix onTraffic --- transport/gnet/tcp/server.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/transport/gnet/tcp/server.go b/transport/gnet/tcp/server.go index 411a5870..4d19a087 100644 --- a/transport/gnet/tcp/server.go +++ b/transport/gnet/tcp/server.go @@ -5,8 +5,8 @@ import ( "fmt" "github.com/golang/protobuf/proto" "github.com/panjf2000/gnet/v2" - "github.com/symsimmy/due/errors" "github.com/symsimmy/due/common/endpoint" + "github.com/symsimmy/due/errors" "github.com/symsimmy/due/log" "github.com/symsimmy/due/transport" ) @@ -71,8 +71,6 @@ func (s *Server) OnTraffic(c gnet.Conn) (action gnet.Action) { if err != nil { log.Debugf("server receive messageId:[%+v],handler[route=%+v] failed.err:%+v", data.Route, data.MessageId, err) - - continue } if v != nil { From 508f01bdd505f957776c6550456fc87321e5201f Mon Sep 17 00:00:00 2001 From: David_zdw Date: Mon, 21 Oct 2024 17:16:58 +0800 Subject: [PATCH 2/2] fix onTraffic error log --- transport/gnet/tcp/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport/gnet/tcp/server.go b/transport/gnet/tcp/server.go index 4d19a087..bd67815f 100644 --- a/transport/gnet/tcp/server.go +++ b/transport/gnet/tcp/server.go @@ -70,7 +70,7 @@ func (s *Server) OnTraffic(c gnet.Conn) (action gnet.Action) { v, err := s.receiveHandler(data.Route, data.Data) if err != nil { - log.Debugf("server receive messageId:[%+v],handler[route=%+v] failed.err:%+v", data.Route, data.MessageId, err) + log.Errorf("server receive messageId:[%+v],handler[route=%+v] failed.err:%+v", data.Route, data.MessageId, err) } if v != nil {