Revert "Update recieve function to read full data from socket at once"

This reverts commit a3d2458c28.
This commit is contained in:
syeopite 2021-06-09 15:52:46 -07:00
parent 40b9ccc733
commit 53f31fd94c
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82
1 changed files with 3 additions and 2 deletions

View File

@ -225,10 +225,11 @@ module QUIC
LibLsquic.engine_packet_in(engine, buffer[0, bytes_read], bytes_read, socket.local_address, socket.remote_address, Box.box(socket), 0) if bytes_read != 0
LibLsquic.engine_process_conns(engine)
end
@socket.try &.close
@socket = nil
rescue IO::Error
# may have already been closed
ensure
@socket.try &.close
@socket = nil
end
end