mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Log failure to close fsnotify handle (#1250)
This commit is contained in:
@@ -1105,7 +1105,11 @@ func inotifyAwait(ctx context.Context, iofsDir string) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("error getting fsnotify watcher: %v", err)
|
||||
}
|
||||
defer fsWatcher.Close()
|
||||
defer func() {
|
||||
if err := fsWatcher.Close(); err != nil {
|
||||
common.Logger(ctx).WithError(err).Error("Failed to close inotify watcher")
|
||||
}
|
||||
}()
|
||||
|
||||
err = fsWatcher.Add(iofsDir)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user