Fix em-http-request callback triggering #196

Merged
merged 1 commit into from Jul 23, 2012

Projects

None yet

2 participants

Contributor

Previously, if there were other EM::Deferred callbacks registered, they
might execute before WebMock's callback and raise an exception. This
would prevent the WebMock callback ever running, even though there was a
successful request.

Overriding set_deferred_status prevents this by triggering WebMock's
callbacks before running any of the EM::Deferred callbacks.

Sorry, I have no idea how to test this.

@jonleighton jonleighton Fix em-http-request callback triggering
Previously, if there were other EM::Deferred callbacks registered, they
might execute before WebMock's callback and raise an exception. This
would prevent the WebMock callback ever running, even though there was a
successful request.

Overriding set_deferred_status prevents this by triggering WebMock's
callbacks before running any of the EM::Deferred callbacks.

Sorry, I have no idea how to test this.
71e7baf
Owner
bblimke commented Jul 23, 2012

Thanks for this fix. No idea what's the best way to test that either :)

@bblimke bblimke merged commit e962df7 into bblimke:master Jul 23, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment