From 7ccf4e2f11585c4811b72a3b52d9091b73ce9972 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Mon, 13 Sep 2010 14:39:17 +0000 Subject: [PATCH] Change stream writes to be non-blocking, this has been pretty heavily tested over the last couple days, and should preserve the original behavior as well. This fixes a deadlock in Ruby in certain conditions git-svn-id: file:///home/svn/framework3/trunk@10306 4d416f70-5f16-0410-b530-b9f4589650da --- lib/rex/io/stream.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rex/io/stream.rb b/lib/rex/io/stream.rb index 8f88d36c46..8e26ce7c7f 100644 --- a/lib/rex/io/stream.rb +++ b/lib/rex/io/stream.rb @@ -41,7 +41,7 @@ module Stream next end data = buf[0, 32768] - sent = fd.syswrite( data ) + sent = fd.write_nonblock( data ) if sent > 0 total_sent += sent buf[0, sent] = ""