[Flask] Disconnect with the server after each request

Ritesh Nadhani riteshn at gmail.com
Wed Mar 7 19:41:28 EST 2018


Hello Teng

This is not really a Flask problem. This is in general how HTTP/1 works in
request/response format. Once the results for a request is done, the client
disconnects.

If you want persistent connection, then you will have to update the robot
code to use something like websockets.

On Wed, Mar 7, 2018 at 3:08 PM, Teng Li <tengli at vt.edu> wrote:

> Hey guys,
>
> Sorry to bother. I'm using flask and restful to build a server for the
> communication of several robots. They send data to the server and store in
> MongoDB. However, I found that these robots disconnect with the server
> after every request, but I need them connected all the time. Is someone
> know how to fix this issue? I will be really appreciated it!
>
> Thank you,
>
> Kevin
>
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> Virus-free.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
> <#m_7776288787103621951_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask
>
>


-- 
Ritesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20180307/a766626e/attachment-0001.html>


More information about the Flask mailing list