Skip to content
This repository has been archived by the owner on Sep 29, 2024. It is now read-only.

v1.4 OnConnect() not triggering #166

Closed
stverhae opened this issue Feb 9, 2017 · 9 comments
Closed

v1.4 OnConnect() not triggering #166

stverhae opened this issue Feb 9, 2017 · 9 comments

Comments

@stverhae
Copy link

stverhae commented Feb 9, 2017

I was checking the impact of v1.4 conversion on my code when I noticed the OnConnect never triggers.
I ran the example in the 1.4 branch and noticed the same issue. Even if you put a panic in the OnConnect handler, nothing happens. Major breaking issue for us.

@tpoxa
Copy link

tpoxa commented Feb 22, 2017

Same here. Have you found any solution?

@stverhae
Copy link
Author

Nope, I just went back to using the old version as I didn't trust the v1.4 version at this stage yet. You can fork and hack in the fix, but for us that kind of defeats the purpose of upgrading. Tried to make a clean fix so I could submit a PR, but was unsure where to do that since the relevant code still seems to be in a transition fase between the old master code and v1.4.
Hopefully this gets fixed soon!

googollee added a commit that referenced this issue Feb 23, 2017
@googollee
Copy link
Owner

Thank you @stverhae. Could you try again?

@stverhae
Copy link
Author

@googollee Thanks, the onConnect handler works well in the example code now!
Could you shed some light on the state of the v1.4 branch? how production ready is it, and would you recommend people to upgrade at this point?

@tpoxa
Copy link

tpoxa commented Feb 25, 2017

Thank you for update. On connect event works now. But what about onDisconnect?
Should I see "closed" message after I close the page?

@googollee
Copy link
Owner

@tpoxa Currently, if you close socketio connection in js, the server will receive disconnect event, otherwise, the server will receive an error.

@fooevr
Copy link

fooevr commented Jun 19, 2017

I close socket.io connection in js, but OnDisconnect and OnError event is not trigger.
go-socket.io version is v1.4. can you fix it? thanks.

@googollee
Copy link
Owner

@fooevr could you give me any example code?

@tangxinfa
Copy link

tangxinfa commented Oct 18, 2017

@tpoxa Currently, if you close socketio connection in js, the server will receive disconnect event, otherwise, the server will receive an error.

@googollee Sadly the OnError callback just pass a error object, no conn provide, so i can't figureout which connection disconnected

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

No branches or pull requests

5 participants