Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL Socket test sometimes loops forever #4

Merged
merged 1 commit into from
May 6, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions spec/nio/selectables/ssl_socket_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@
speer.accept

begin
sclient.write_nonblock "X" * 1024
_, writers = select [], [sclient], [], 0
count = sclient.write_nonblock "X" * 1024
count.should_not == 0
rescue IO::WaitReadable, IO::WaitWritable
end while writers and writers.include? sclient
pending "SSL will report writable but not accept writes"
raise if(writers.include? sclient)
end while writers.include? sclient

# I think the kernel might manage to drain its buffer a bit even after
# the socket first goes unwritable. Attempt to sleep past this and then
Expand Down