Skip to content

Commit

Permalink
Enable read_buffering on the TCP socket
Browse files Browse the repository at this point in the history
Meaningful for AMQP frame parsing
  • Loading branch information
carlhoerberg committed May 27, 2024
1 parent 34a1b0f commit c654b69
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/websocket-tcp-relay/websocket_relay.cr
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module WebSocketTCPRelay
puts "#{remote_addr} connected"
tcp_socket = TCPSocket.new(host, port, dns_timeout: 5, connect_timeout: 15)
tcp_socket.tcp_nodelay = true
tcp_socket.read_buffering = false
tcp_socket.keepalive = true
tcp_socket.tcp_keepalive_idle = 60
tcp_socket.tcp_keepalive_interval = 10
Expand All @@ -22,7 +21,6 @@ module WebSocketTCPRelay
if ctx = tls_ctx
OpenSSL::SSL::Socket::Client.new(tcp_socket, ctx, hostname: host).tap do |c|
c.sync_close = true
c.read_buffering = false
end
else
tcp_socket
Expand Down

0 comments on commit c654b69

Please sign in to comment.