This commit is contained in:
crusader 2018-05-08 19:09:47 +09:00
parent 8fb9ee1301
commit 8b1daa22ff

View File

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