Skip to content

Commit

Permalink
Also call increment read window from eof call on Client socket
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Sep 24, 2024
1 parent 5e87745 commit 37475da
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sockets/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,12 @@ function Base.skip(sock::Client, n)
end

Base.bytesavailable(sock::Client) = bytesavailable(sock.readbuf)
Base.eof(sock::Client) = eof(sock.readbuf)

function Base.eof(sock::Client)
maybe_increment_read_window(sock, 0)
eof(sock.readbuf)
end

Base.isopen(sock::Client) = sock.slot == C_NULL ? false : aws_socket_is_open(aws_socket_handler_get_socket(FieldRef(sock, :handler)))

function Base.readbytes!(sock::Client, buf::AbstractVector{UInt8}, nb=length(buf))
Expand Down

0 comments on commit 37475da

Please # to comment.