ing
This commit is contained in:
parent
81d3fff70a
commit
874dc27745
|
@ -62,7 +62,7 @@ func (c *client) Connect() error {
|
|||
c.rwcHandler.Validate()
|
||||
|
||||
if c.stopChan != nil {
|
||||
panic("RPC Client: the given client is already started. Call Client.Stop() before calling Client.Start() again!")
|
||||
return fmt.Errorf("RPC Client: the given client is already started. Call Client.Stop() before calling Client.Start() again")
|
||||
}
|
||||
c.ctx = c.ch.ClientContext(nil)
|
||||
|
||||
|
@ -84,7 +84,8 @@ func (c *client) Connect() error {
|
|||
|
||||
func (c *client) Close() {
|
||||
if c.stopChan == nil {
|
||||
panic("RPC Client: the client must be started before stopping it")
|
||||
logging.Logger().Warn("RPC Client: the client must be started before stopping it")
|
||||
return
|
||||
}
|
||||
|
||||
c.ch.Destroy(c.ctx)
|
||||
|
|
|
@ -104,7 +104,8 @@ func (s *rpcServlet) Context() ServletContext {
|
|||
|
||||
func (s *rpcServlet) destroy(err error) {
|
||||
if s.stopChan == nil {
|
||||
panic("Server: server must be started before stopping it")
|
||||
logging.Logger().Warn("Server: server must be started before stopping it")
|
||||
return
|
||||
}
|
||||
|
||||
close(s.stopChan)
|
||||
|
|
Loading…
Reference in New Issue
Block a user