fix a minor fd leak
This commit is contained in:
parent
853ec68253
commit
edc3bf2347
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ checkDaemon pidfile = do
|
|||
Just fd -> do
|
||||
locked <- getLock fd (ReadLock, AbsoluteSeek, 0, 0)
|
||||
p <- readish <$> readFile pidfile
|
||||
return $ check locked p
|
||||
closeFd fd `after` return (check locked p)
|
||||
Nothing -> return Nothing
|
||||
where
|
||||
check Nothing _ = Nothing
|
||||
|
|
Loading…
Reference in a new issue