Commit 87831f3e authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman 💥
Browse files

Fix: IGate reads only the qty of bytes ready to be read.

parent b6eafa18
......@@ -112,10 +112,13 @@ module Apex
read_more = true
while read_more
selected = IO.select([@aprsis_sock], [], [], 0)
if selected.first.length > 0
recvd_data = @aprsis_sock.gets
if recvd_data
@data_buffer += recvd_data
if selected.nil? == false
ready_len = selected.first.length
if ready_len > 0
recvd_data = @aprsis_sock.read(ready_len)
if recvd_data
@data_buffer += recvd_data
end
end
else
read_more = false
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment