Skip to content

Commit

Permalink
Clarify what's the purpose of sending 1 byte
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesus committed Jul 24, 2019
1 parent 1e7bebe commit ea4dbc9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/test_puma_server_ssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ def test_url_scheme_for_https
def test_request_wont_block_thread
# Open a connection and give enough data to trigger a read, then wait
socket = TCPSocket.new @host, @port
socket.write "x"
socket.write "x" # We send a single byte and we'll later close the socket,
# this isn't enough data to process a SSL Client Hello.
# Therefore, this will cause our SSL implementation to try
# to read more from the socket before rejecting the
# connection due to an error in handshake.
sleep 1

# Capture the amount of threads being used after connecting and being idle
Expand Down

0 comments on commit ea4dbc9

Please sign in to comment.