From 8b1daa22ffd53037990e325697d620a2fa24bab3 Mon Sep 17 00:00:00 2001 From: crusader Date: Tue, 8 May 2018 19:09:47 +0900 Subject: [PATCH] ing --- servlet/rpc-servlet.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/servlet/rpc-servlet.go b/servlet/rpc-servlet.go index 64b4184..9dee116 100644 --- a/servlet/rpc-servlet.go +++ b/servlet/rpc-servlet.go @@ -6,7 +6,6 @@ import ( logging "git.loafle.net/commons/logging-go" crp "git.loafle.net/commons/rpc-go/protocol" - crpj "git.loafle.net/commons/rpc-go/protocol/json" "git.loafle.net/commons/server-go" css "git.loafle.net/commons/server-go/socket" cssw "git.loafle.net/commons/server-go/socket/web" @@ -23,7 +22,8 @@ type RPCServlet interface { type RPCServlets struct { cssw.Servlets - UseSession bool + RPCServerCodec crp.ServerCodec + UseSession bool sessions sync.Map } @@ -72,7 +72,6 @@ func (s *RPCServlets) Handle(servletCtx server.ServletCtx, replyBuff []byte err error ) - sc := crpj.NewServerCodec() _clientType := servletCtx.GetAttribute(og.SessionClientTypeKey) _sessionID := servletCtx.GetAttribute(og.SessionIDKey) @@ -95,7 +94,7 @@ func (s *RPCServlets) Handle(servletCtx server.ServletCtx, return } // grpc exec method call - src, err = sc.NewRequest(msg) + src, err = s.RPCServerCodec.NewRequest(msg) if nil != err { logging.Logger().Error(err) break