Skip to content

Commit

Permalink
Reinstate yield() after @async writebody(...).
Browse files Browse the repository at this point in the history
Was removed in b602c4e :

> Remove yeild() after @async writebody. This should increase the chance
> that the startread() realises that the connection is dead before the
> body is written.

This change appears to have caused problems in other situations:
JuliaCloud/AWSS3.jl#26 (comment)

The removal was driven by nanosoldier/GitHub.jl issues with POST
requests on long-held connections.
#220 (comment)

GitHub.jl now handles this with the `idle_timeout=` option.
JuliaWeb/GitHub.jl#109
  • Loading branch information
samoconnor committed Apr 16, 2018
1 parent 5daa105 commit fa6b206
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/StreamRequest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function request(::Type{StreamLayer}, io::IO, request::Request, body;

if iofunction == nothing
@async writebody(http, request, body)
yield()
startread(http)
readbody(http, response, response_stream)
else
Expand Down

0 comments on commit fa6b206

Please sign in to comment.