Add a bunch of missed defer f.Close() -- none of which I believe could lea file descriptors though from open files #531

Merged
prologic merged 1 commits from defer_f_Close into master 2 months ago
Owner

Maybe we have a socket leak and/or some goroutine leaks?

Maybe we have a socket leak and/or some goroutine leaks?
prologic added 1 commit 2 months ago
prologic requested review from xuu 2 months ago
xuu approved these changes 2 months ago
log.WithError(err).Warnf("error opening feed: %s", fn)
return nil, err
}
defer f.Close()
xuu commented 2 months ago
Poster
Collaborator

This one would def cause issues over time.

This one would def cause issues over time.
Poster
Owner

Yes I believe so too! This is conssumed by a daily job that produces the pod's @stats feed, so this would have 98% caused "too many open files" 😅 Whoops! 🤦‍♂️

Yes I _believe_ so too! This is conssumed by a daily job that produces the pod's [@stats](https://twtxt.net/~stats) feed, so this would have 98% caused "too many open files" 😅 Whoops! 🤦‍♂️
prologic marked this conversation as resolved
prologic merged commit 799e4564e9 into master 2 months ago

Reviewers

xuu approved these changes 2 months ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 799e4564e9.
Sign in to join this conversation.
Loading…
There is no content yet.