miguelgrinberg/Flask-SocketIO-Chat

Server receives event correctly, but It doesn't execute method

sbqsbqsbq opened this issue · 1 comments

I have written my code as the below. I pretended to print sentence when the event named 'my event' occurred.

@socketio.on("my event", namespace="/v1/chat")
def my_event():
    logging.info("Listening My Event")

However, It doesn't execute method. The below is logcat from my flask sever.

12-07-2018:06:58:31,132 INFO     [socket.py:52] b9b1bbe8e27541a9837476022e7e9b89: Received packet MESSAGE data 2/api/v1/chat,["my event",{"data":"I'm connected!"}]
12-07-2018:06:58:31,132 INFO     [server.py:453] received event "my event" from b9b1bbe8e27541a9837476022e7e9b89 [/api/v1/chat]

How can I solve this problem?