Skip to content

Commit

Permalink
tcp: re-enable half-duplex operation support (JuliaLang#46088)
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash authored and Francesco Fucci committed Aug 11, 2022
1 parent 8a78454 commit 87e4686
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions base/stream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,11 @@ function uv_readcb(handle::Ptr{Cvoid}, nread::Cssize_t, buf::Ptr{Cvoid})
elseif nread == UV_EOF # libuv called uv_stop_reading already
if stream.status != StatusClosing
stream.status = StatusEOF
if stream isa TTY # TODO: || ccall(:uv_is_writable, Cint, (Ptr{Cvoid},), stream.handle) != 0
# stream can still be used either by reseteof # TODO: or write
if stream isa TTY
# stream can still be used by reseteof (or possibly write)
notify(stream.cond)
elseif !(stream isa PipeEndpoint) && ccall(:uv_is_writable, Cint, (Ptr{Cvoid},), stream.handle) != 0
# stream can still be used by write
notify(stream.cond)
else
# underlying stream is no longer useful: begin finalization
Expand Down

0 comments on commit 87e4686

Please sign in to comment.