Ah yes.. That is true..

If I comment out request.finish() (Here is the doc which I tried to
followed:
https://twistedmatrix.com/documents/13.0.0/web/howto/web-in-60/interrupted.html
)
Then actually.. when I try to test out the code... (via curl or like doing
requests.get .. to the URI)..
it is just stuck..

In [491]: requests.get("http://0.0.0.0:9999/test ....with params " )
It just stays stuck :(


I do want to convey my thanks for the help. Really appreciate it.


On Sun, Aug 4, 2019 at 11:55 PM Glyph <gl...@twistedmatrix.com> wrote:

>
>
> > On Aug 4, 2019, at 8:43 PM, Waqar Khan <wk80...@gmail.com> wrote:
> >
> > Just for sake of completeness:
> > def print_json_response(resp, request):
> >          request.write(json.dumps(resp))
> >          request.close()
>
> Presumably this line actually says "request.finish()"?
>
> This is indeed the problem; just don't call "request.finish()" if
> notifyFinish() has already been callback'd.
>
> -g
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to