Browse Source

confwatcher: remove redundant code (#2592)

pull/2594/head
Alessandro Ros 2 years ago committed by GitHub
parent
commit
f11f39f023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      internal/confwatcher/confwatcher.go

9
internal/confwatcher/confwatcher.go

@ -30,14 +30,7 @@ type ConfWatcher struct {
// New allocates a ConfWatcher. // New allocates a ConfWatcher.
func New(confPath string) (*ConfWatcher, error) { func New(confPath string) (*ConfWatcher, error) {
if _, err := os.Stat(confPath); err != nil { if _, err := os.Stat(confPath); err != nil {
if confPath == "mediamtx.yml" { return nil, err
confPath = "rtsp-simple-server.yml"
if _, err := os.Stat(confPath); err != nil {
return nil, err
}
} else {
return nil, err
}
} }
inner, err := fsnotify.NewWatcher() inner, err := fsnotify.NewWatcher()

Loading…
Cancel
Save