add further error handling for rpc connection handling
This commit is contained in:
parent
94a9cf6a19
commit
402a026c88
|
@ -476,7 +476,16 @@ func (s *Server) reloadTLSConnections(newTLSConfig *config.TLSConfig) error {
|
||||||
s.connPool.ReloadTLS(tlsWrap)
|
s.connPool.ReloadTLS(tlsWrap)
|
||||||
|
|
||||||
// reinitialize our rpc listener
|
// reinitialize our rpc listener
|
||||||
s.rpcListener.Close()
|
if s.rpcListener == nil {
|
||||||
|
s.logger.Println("Unable to reload configuration due to uninitialized rpc listner")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := s.rpcListener.Close(); err != nil {
|
||||||
|
s.logger.Printf("[ERR] nomad: Unable to close rpc listener %s", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
<-s.listenerCh
|
<-s.listenerCh
|
||||||
s.startRPCListener()
|
s.startRPCListener()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue