allow verifyClient to run asynchronously #27

Merged
merged 1 commit into from Feb 28, 2012

Conversation

Projects
None yet
3 participants

If the verifyClient method has 2 parameters, then it's assumed that the 2nd parameter is a callback. This allows verifyClient to asynchronous code - say, looking up an id in the database.

Contributor

einaros commented Feb 23, 2012

Thanks, I'll merge this (and add the same for the Hixie transport).

@einaros einaros merged commit 4bc6355 into websockets:master Feb 28, 2012

This test isn't async, it's still sync.

To make it async you should wrap the cb(false) in a process.nextTick or setTImeout.

Contributor

einaros replied Mar 21, 2012

Pullreq! ;)

Owner

3rd-Eden replied Mar 21, 2012

Hardcore forking action on it's way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment