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

Failed namespace authorization should fire 'connect_failed', not 'error' event #524

Closed
fodor0205 opened this issue Sep 15, 2011 · 6 comments
Labels
bug Something isn't working

Comments

@fodor0205
Copy link

Documentation says:
"Failed authorizations are handled a bit differently than global authorization requests. Instead of emitting an error event we emit a connect_failed event."

But it fires the 'error' event.

I have written a small testcase for this:

My socket.io is v0.8.4

@josephg
Copy link

josephg commented Sep 19, 2011

+1

2 similar comments
@manast
Copy link

manast commented Oct 19, 2011

+1

@Wizek
Copy link

Wizek commented Feb 17, 2012

+1

@zoowar
Copy link

zoowar commented Feb 23, 2012

If you omit the message string it will fire "connect_failed"

cb(null, false); => fires "connect_failed"
cb("message", false); => fires "error"

@peica
Copy link

peica commented Jun 20, 2012

Why not update the document to mention this behavior?

If you omit the message string it will fire "connect_failed"

cb(null, false); => fires "connect_failed"
cb("message", false); => fires "error"

@manast
Copy link

manast commented Jun 20, 2012

Furthermore, if you use one of the predefined "reasons" you will get
connect_failed as well:

cb("unauthorized") -> "connect_failed" (Note that you don't need to
specify the last parameter if authentication failed.

Read more here:
#331

On Tue, 19 Jun 2012 23:47:05 -0700, peica wrote:

Why not update the document to mention this behavior?

If you omit the message string it will fire "connect_failed"

cb(null, false); => fires "connect_failed"
cb("message", false); => fires "error"


Reply to this email directly or view it on GitHub:

#524 (comment)

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants