-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix file handle leak in read #139
Conversation
The actual fix is onRead, and tests are about 19x longer. Apologies for the extra work loaded onto the actual fix 👼🏽 |
(Useful for _my_ tests, should not be upstreamed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks especially for the test!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @arielshaqed!
Just had a couple of questions, leaving the real review to @willscott of course 🙂
} | ||
t.mu.Lock() | ||
defer t.mu.Unlock() | ||
id := rand.Int63() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Isn't the filename sufficient?
And if not, why not use a UUID, or even an atomically incremented ID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A leftover from my local testing.
Thanks! Sorry about that nasty leftover in go.mod . |
Thanks! 37 minutes to review an external PR has got to be a record... |
Thanks again for the catch and the test!
Put in tag & release v0.0.3 for pointing to if useful.
…--Will
On Thu, Feb 6, 2025 at 10:47 AM Ariel Shaqed (Scolnicov) < ***@***.***> wrote:
Thanks! 37 minutes to review an external PR has got to be a record...
—
Reply to this email directly, view it on GitHub
<#139 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADIRJ2FNNSLGFSIOKXAXST2OM4VBAVCNFSM6AAAAABWTELG66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZZGQ3DOMBRGY>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
No description provided.