ing
This commit is contained in:
parent
c9fbeb37d8
commit
bd224840cf
13
servlet.go
13
servlet.go
|
@ -81,6 +81,13 @@ func (s *rpcServlet) Start(parentCTX cuc.Context, conn interface{}, doneChan cha
|
|||
}
|
||||
|
||||
func (s *rpcServlet) Stop() {
|
||||
if s.stopChan == nil {
|
||||
logging.Logger().Warn("Server: server must be started before stopping it")
|
||||
return
|
||||
}
|
||||
|
||||
close(s.stopChan)
|
||||
|
||||
s.destroy(nil)
|
||||
}
|
||||
|
||||
|
@ -103,12 +110,6 @@ func (s *rpcServlet) Context() ServletContext {
|
|||
}
|
||||
|
||||
func (s *rpcServlet) destroy(err error) {
|
||||
if s.stopChan == nil {
|
||||
logging.Logger().Warn("Server: server must be started before stopping it")
|
||||
return
|
||||
}
|
||||
|
||||
close(s.stopChan)
|
||||
s.stopWg.Wait()
|
||||
|
||||
s.sh.Destroy(s.ctx)
|
||||
|
|
Loading…
Reference in New Issue
Block a user