forked from External/mediamtx
confwatcher: remove redundant code (#2592)
This commit is contained in:
parent
88dd8d23f4
commit
f11f39f023
1 changed files with 1 additions and 8 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue