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 configure with uwsgi? #14

Closed
gbishop opened this issue Jan 12, 2019 · 3 comments
Closed

How to configure with uwsgi? #14

gbishop opened this issue Jan 12, 2019 · 3 comments

Comments

@gbishop
Copy link

gbishop commented Jan 12, 2019

The library works fine when used directly, and also when I use it through nginx. But when I try to run the app with uwsgi, I get None for the websocket (ws) in the handler. I just copied your echo handler for a quick test.

@app.get('/websocket', apply=[websocket], name='ws')
def echo(ws):
    while True:
        msg = ws.receive()
        print('got', msg)
        if msg is not None:
            ws.send(msg)
            print('sent', msg)
        else:
            break

I'm missing something in the configuration of uwsgi I guess. Do you have an example of running it with uwsgi?

@gbishop
Copy link
Author

gbishop commented Jan 12, 2019

I think I'm just going to abandon uwsgi. I don't need it. This works fine behind nginx without uwsgi in the middle.

@gbishop gbishop closed this as completed Jan 12, 2019
@zeekay
Copy link
Owner

zeekay commented Jan 12, 2019

You can also check out https://github.com/zeekay/flask-uwsgi-websocket, which works really well with uwsgi. I'll take a look at things this weekend if I have time.

@gbishop
Copy link
Author

gbishop commented Jan 12, 2019 via email

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

No branches or pull requests

2 participants