mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
parent
f4732768cc
commit
e80a9c8b92
2 changed files with 2 additions and 2 deletions
|
@ -113,7 +113,7 @@ module Capybara::Webkit
|
|||
def attempt_connect
|
||||
@socket = @socket_class.open("127.0.0.1", @port)
|
||||
if defined?(Socket::TCP_NODELAY)
|
||||
@socket.setsockopt(:IPPROTO_TCP, :TCP_NODELAY, 1)
|
||||
@socket.setsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, true)
|
||||
end
|
||||
rescue Errno::ECONNREFUSED
|
||||
end
|
||||
|
|
|
@ -38,7 +38,7 @@ describe Capybara::Webkit::Connection do
|
|||
socket = stub('socket')
|
||||
TCPSocket.stub(:open).and_return(socket)
|
||||
if defined?(Socket::TCP_NODELAY)
|
||||
socket.should_receive(:setsockopt).with(:IPPROTO_TCP, :TCP_NODELAY, 1)
|
||||
socket.should_receive(:setsockopt).with(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, true)
|
||||
else
|
||||
socket.should_not_receive(:setsockopt)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue