Skip to content

Commit

Permalink
Update Easy.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash authored Sep 6, 2023
1 parent 83212de commit 18aeae8
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/Curl/Easy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,13 @@ end
# feed data to read_callback
function upload_data(easy::Easy, input::IO)
while true
if easy.input === nothing || isempty(easy.input)
data = eof(input) ? nothing : readavailable(input)
easy.input === nothing && break
easy.input = data
end
data = eof(input) ? nothing : readavailable(input)
easy.input === nothing && break
reset(easy.input)
easy.input = data
curl_easy_pause(easy.handle, Curl.CURLPAUSE_CONT)
wait(easy.ready)
easy.input === nothing && break
easy.ready = Threads.Event()
end
end

Expand Down

0 comments on commit 18aeae8

Please sign in to comment.