Multiple connection hangs
Hello. I have a database of telegram sessions in the amount of 200 pieces. There is a telegram bot that winds up reactions under the post. With a new task, the bot launches a function that sorts through the telegrams of the session one by one and puts reactions, with an interval of 10 seconds.
I have a problem: When several tasks are running at the same time (that is, the function that iterates over connections is launched several times) at a certain point it stops connecting and just hangs, what's the problem?
Also, connection closed while receiving data also writes to me, what is the reason?
Do I need to somehow close the connections if the function has already been executed?