0

I have an async function that fires a emit everytime there is a new message. However sometimes it takes a very long time and if there are several new messages incoming then it doesnt emit all of them.


async def event_message(ctx):
    newtext={"username": ctx.author.name,"chat":ctx.content, "color": color}
    await socketio.emit("thechat",newtext, room=ctx.channel.name)


if __name__ =='__main__': 
    web.run_app(app, port=5000)

I am using python-socketio async server with react frontend

Any help would be extremely appreciated thanks.

  • sorry. no can do for help with such a small fragment of code. Please, produce a minimal reproducible example of your problem - if needed with a client script. – jsbueno Mar 27 '23 at 16:49

0 Answers0