Sally7 icon indicating copy to clipboard operation
Sally7 copied to clipboard

fix: Prevent exception on return of job ID to disposed pool

Open mycroes opened this issue 1 year ago • 2 comments

Currently when the connection is disposed and requests are still in the queue they will except because the job ID can no longer be returned to the pool. Making the exception on ReturnJobId conditional on a new _disposed flag prevents the exception from being thrown, but it does permit 'successful' returns to a disposed pool.

@gfoidl please let me know what you think. This is hitting us in production now, so I'll probably merge this quickly.

mycroes avatar Nov 30 '23 08:11 mycroes

@gfoidl No need to hurry, hotfixed the previous release, because there's some unreleased changes on main anyway.

mycroes avatar Nov 30 '23 08:11 mycroes

Thanks @gfoidl, appreciate your opinion a lot. I intend to add some unit tests for this behavior as well, so I'm not merging straight away.

mycroes avatar Nov 30 '23 10:11 mycroes