diff --git a/servlet.go b/servlet.go index fb7970b..b295070 100644 --- a/servlet.go +++ b/servlet.go @@ -123,6 +123,7 @@ func handleServlet(s *rpcServlet) { logging.Logger().Info(fmt.Sprintf("Servlet is started")) defer func() { + s.Stop() s.doneChan <- err s.stopWg.Done() }() @@ -151,7 +152,7 @@ func handleServlet(s *rpcServlet) { if err != nil { logging.Logger().Error(fmt.Sprintf("RPC Server: servlet error %v", err)) } - logging.Logger().Info(fmt.Sprintf("Servlet is started")) + } func handleReader(s *rpcServlet, stopChan chan struct{}, doneChan chan error) {