ing
This commit is contained in:
parent
888569749a
commit
3e3a884c4d
|
@ -85,14 +85,13 @@ func (s *rpcServlet) Stop() {
|
||||||
panic("Server: server must be started before stopping it")
|
panic("Server: server must be started before stopping it")
|
||||||
}
|
}
|
||||||
|
|
||||||
s.sh.Destroy(s.ctx)
|
|
||||||
|
|
||||||
close(s.stopChan)
|
close(s.stopChan)
|
||||||
s.stopWg.Wait()
|
s.stopWg.Wait()
|
||||||
|
|
||||||
|
s.sh.Destroy(s.ctx)
|
||||||
|
|
||||||
s.stopChan = nil
|
s.stopChan = nil
|
||||||
|
|
||||||
s.responseQueueChan = nil
|
s.responseQueueChan = nil
|
||||||
|
|
||||||
s.conn = nil
|
s.conn = nil
|
||||||
s.serverCodec = nil
|
s.serverCodec = nil
|
||||||
|
|
||||||
|
@ -123,9 +122,9 @@ func handleServlet(s *rpcServlet) {
|
||||||
logging.Logger().Info(fmt.Sprintf("Servlet is started"))
|
logging.Logger().Info(fmt.Sprintf("Servlet is started"))
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
s.doneChan <- err
|
|
||||||
s.stopWg.Done()
|
s.stopWg.Done()
|
||||||
s.Stop()
|
s.Stop()
|
||||||
|
s.doneChan <- err
|
||||||
}()
|
}()
|
||||||
|
|
||||||
subStopChan := make(chan struct{})
|
subStopChan := make(chan struct{})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user