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

how to use with goji #121

Closed
fmpwizard opened this issue Apr 11, 2016 · 2 comments
Closed

how to use with goji #121

fmpwizard opened this issue Apr 11, 2016 · 2 comments

Comments

@fmpwizard
Copy link

Hi,

I tried the chat sample on its own and works great, but then I tried to port it to my app that uses goji and the pat router and now the ws connections gives me:

WebSocket connection to 'ws://192.168.1.10:9000/ws' failed: Connection closed before receiving a handshake response

and the handler serveWs is never called (I added a log.Println as the first line inside serveWs and it is not printed)

on main.go I tried:

    m.HandleFuncC(
        pat.Get("/ws"),
        srv.WithDataAuth(ws.ServeWs),
    )

and

    m.HandleFuncC(
        pat.New("/ws"),
        srv.WithDataAuth(ws.ServeWs),
    )

both give me the same result, none call my handlers.

Any help would be great.

Thanks

@garyburd
Copy link
Contributor

I cannot help you with goji and the pat router. I only know these projects by name.

Because the websocket handler is not called, the issue is outside the scope of this package.

@fmpwizard
Copy link
Author

just in case anyone else runs into this, the issue was that I had browsersync between my go app and the browser and that causes the websocket connection to fail.

BrowserSync/browser-sync#780

Thank you.

@gorilla gorilla locked and limited conversation to collaborators Feb 14, 2018
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

2 participants