Closed shyam3089 closed 1 year ago
I think the problem here is that you are not following the rules for writing an asynchronous application, either with eventlet or gevent. My suggestion is that if you don't want to worry about learning a new programming paradigm you use the threading
async mode, which should be compatible with your current design.
Thank you for the response. With threading
as async
mode application is working as expected. But I get this warning :-
The WebSocket transport is not available, you must install a WebSocket server that is compatible with your async mode to enable it. See the documentation for details. (further occurrences of this error will be logged with level INFO)
. Is there any way to fix this?
I'm running app with self signed open SSL. There are multiple issues.
Whenever there's an an emit event from the client side error given below appears:
<Greenlet at 0x28cddf81a80: _handle_and_close_when_done(<bound method StreamServer.wrap_socket_and_handle , <bound method StreamServer.do_close of <WSGIServer, (<gevent._socket3.socket [closed] at 0x28cdd08e680)> failed with ConnectionAbortedError
I'm running Flask app in a thread as it's included in another app. Flask app works as an interface for a voice assistant app. Note: when using
eventlet
asasync
mode the app doesn't even work inhttp
mode. What's wrong here?Code:
Client:
$(document).ready(function(){ var socket = io.connect("https://192.168.1.5:3000"); socket.on('flaskMessage', function(msg) { console.log("flaskMessage recieving: ", msg.data) $('#log').html(msg.data); });
});