Skip to content
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

Honoring timeout for sync operations. #1243

Merged

Conversation

jsdevel
Copy link
Contributor

@jsdevel jsdevel commented Jun 19, 2014

This closes #1242.

if (self.timedOut) return;
if (finished) return multiple(err);
self.clearTimeout();
self.duration = new Date - start;
finished = true;
if(!err && self.duration > ms) err = new Error('timeouf of ' + ms + 'ms exceeded');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you fix the typo?

@jsdevel
Copy link
Contributor Author

jsdevel commented Jun 19, 2014

Thanks @DullReferenceException! I fixed the whitespace on the if statement as well.

@therealklanni
Copy link

👍

@travisjeffery travisjeffery merged commit 6f912b8 into mochajs:master Jun 22, 2014
@travisjeffery
Copy link
Contributor

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

-t isn't honored for long running sync operations.
4 participants