diff --git a/servlet.go b/servlet.go index b295070..4e370b0 100644 --- a/servlet.go +++ b/servlet.go @@ -123,9 +123,9 @@ func handleServlet(s *rpcServlet) { logging.Logger().Info(fmt.Sprintf("Servlet is started")) defer func() { - s.Stop() s.doneChan <- err s.stopWg.Done() + s.Stop() }() subStopChan := make(chan struct{})