Skip to content

Commit

Permalink
Small improvment to PROXY parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhoerberg committed Mar 8, 2021
1 parent 7a40a99 commit 94fff50
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/avalanchemq/proxy_protocol.cr
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ module AvalancheMQ
header.split(' ') do |v|
case i
when 0 then raise InvalidSignature.new(v) if v != "PROXY"
when 1 then nil
when 2 then src_addr = v
when 3 then dst_addr = v
when 4 then src_port = v.to_i32
when 5 then dst_port = v.to_i32
else nil
else break
end
i += 1
end
Expand Down

0 comments on commit 94fff50

Please sign in to comment.