dnsforward library -- introduce IsRunning()

This commit is contained in:
Eugene Bujak 2018-11-28 16:43:50 +03:00
parent 7944f23d95
commit 584f441141
1 changed files with 10 additions and 0 deletions

View File

@ -163,6 +163,16 @@ func (s *Server) Stop() error {
return nil return nil
} }
func (s *Server) IsRunning() bool {
s.RLock()
isRunning := true
if s.udpListen == nil {
isRunning = false
}
s.RUnlock()
return isRunning
}
// //
// Server reconfigure // Server reconfigure
// //