From 5f0dc6a76e90199a65ce2b03b8df5ada063ece45 Mon Sep 17 00:00:00 2001 From: crusader Date: Thu, 22 Mar 2018 18:11:45 +0900 Subject: [PATCH] ing --- internal/server/rpc/rpc_gateway_servlet_handlers.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/internal/server/rpc/rpc_gateway_servlet_handlers.go b/internal/server/rpc/rpc_gateway_servlet_handlers.go index b05fba7..30b1973 100644 --- a/internal/server/rpc/rpc_gateway_servlet_handlers.go +++ b/internal/server/rpc/rpc_gateway_servlet_handlers.go @@ -68,12 +68,13 @@ func (sh *RPCGatewayServletHandlers) OnConnect(soc cwf.Socket) { func (sh *RPCGatewayServletHandlers) Handle(soc cwf.Socket, stopChan <-chan struct{}, doneChan chan<- error) { var err error - // rpcServlet := retainRPCServlet(sh.gwRPCSH, sh.rpcRWCSH) + rpcServlet := retainRPCServlet(sh.gwRPCSH, sh.rpcRWCSH) - rpcServlet := cRPC.NewServlet(sh.gwRPCSH, sh.rpcRWCSH) + // rpcServlet := cRPC.NewServlet(sh.gwRPCSH, sh.rpcRWCSH) defer func() { - // releaseRPCServlet(rpcServlet) + rpcServlet.Stop() + releaseRPCServlet(rpcServlet) doneChan <- err }() @@ -86,8 +87,6 @@ func (sh *RPCGatewayServletHandlers) Handle(soc cwf.Socket, stopChan <-chan stru select { case err = <-rpcDoneChan: case <-stopChan: - rpcServlet.Stop() - <-rpcDoneChan } } @@ -122,6 +121,5 @@ func retainRPCServlet(sh GatewayRPCServletHandler, rpcRWCSH cRPC.ServletReadWrit } func releaseRPCServlet(s cRPC.Servlet) { - rpcServletPool.Put(s) }