PSPDFKit-labs / bypass

Bypass provides a quick way to create a custom plug that can be put in place instead of an actual HTTP server to return prebaked responses to client requests.
https://hex.pm/packages/bypass
MIT License
964 stars 111 forks source link

Fix incorrect GenServer.stop usage in Instance.dispatch_awaiting_callers #146

Open IceDragon200 opened 3 months ago

IceDragon200 commented 3 months ago

Based slightly off c-brenn's work, but with a more concise function for reading clarity

Note retained_plugs_count was inefficient as it's usage was only to check for the presence of retained_plugs, rather than its actual count, it's quicker to just scan through the items and exit on the first entry.

grzuy commented 3 weeks ago

For what is worth, changes in this PR fixes the flakiness for us.