Skip to content

Commit 80fda11

Browse files
vtjnashKristofferC
authored andcommitted
tcp: re-enable half-duplex operation support (#46088)
Refs: #42005 (cherry picked from commit 69e319d)
1 parent d336126 commit 80fda11

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

base/stream.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,11 @@ function uv_readcb(handle::Ptr{Cvoid}, nread::Cssize_t, buf::Ptr{Cvoid})
662662
elseif nread == UV_EOF # libuv called uv_stop_reading already
663663
if stream.status != StatusClosing
664664
stream.status = StatusEOF
665-
if stream isa TTY # TODO: || ccall(:uv_is_writable, Cint, (Ptr{Cvoid},), stream.handle) != 0
666-
# stream can still be used either by reseteof # TODO: or write
665+
if stream isa TTY
666+
# stream can still be used by reseteof (or possibly write)
667+
notify(stream.cond)
668+
elseif !(stream isa PipeEndpoint) && ccall(:uv_is_writable, Cint, (Ptr{Cvoid},), stream.handle) != 0
669+
# stream can still be used by write
667670
notify(stream.cond)
668671
else
669672
# underlying stream is no longer useful: begin finalization

0 commit comments

Comments
 (0)