Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…?WorkItemId=1353). Socket#write was not flushing the data, and so a later read could block since the endpoint would not send any response
  • Loading branch information
Shri Borde committed Jul 23, 2009
1 parent fd79351 commit 74d580c
Show file tree
Hide file tree
Showing 15 changed files with 9 additions and 28 deletions.
Expand Up @@ -44,20 +44,6 @@ core\thread\critical_tags.txt:0:critical:Thread.critical= can be mismatched
core\thread\raise_tags.txt:0:critical:Thread#raise on another thread re-raises active exception
core\thread\critical_tags.txt:0:unstable:Thread.critical= does not change status of other existing threads
language\method_tags.txt:0:critical:Calling a method fails with both lambda and block argument
library\net\ftp\get_tags.txt:0:critical:Net::FTP#get (binary mode)
library\net\ftp\getbinaryfile_tags.txt:0:critical:Net::FTP#getbinaryfile
library\net\ftp\retrbinary_tags.txt:0:critical:Net::FTP#retrbinary
library\net\http\http\get_print_tags.txt:0:critical:Net::HTTP.get_print when passed URI it prints the body of the specified uri to $stdout
library\net\http\http\get_print_tags.txt:0:critical:Net::HTTP.get_print when passed host, path, port it prints the body of the specified uri to $stdout
library\net\http\http\lock_tags.txt:0:critical:Net::HTTP#lock sends a LOCK request to the passed path and returns the response
library\net\http\http\post_form_tags.txt:0:critical:Net::HTTP.post_form when passed URI POSTs the passed form data to the given uri
library\net\http\http\post_tags.txt:0:critical:Net::HTTP#post
library\net\http\http\propfind_tags.txt:0:critical:Net::HTTP#propfind
library\net\http\http\proppatch_tags.txt:0:critical:Net::HTTP#proppatch
library\net\http\http\put_tags.txt:0:critical:Net::HTTP#put
library\net\http\http\request_tags.txt:0:critical:Net::HTTP#request
library\net\http\http\send_request_tags.txt:0:critical:Net::HTTP#send_request
library\net\http\http\unlock_tags.txt:0:critical:Net::HTTP#unlock
library\resolv\get_address_tags.txt:0:critical:Resolv#getaddress
library\resolv\get_addresses_tags.txt:0:critical:Resolv#getaddresses
library\resolv\get_name_tags.txt:0:critical:Resolv#getname
Expand Down
@@ -1,4 +1,4 @@
critical:Net::FTP#get (binary mode)
fails:Net::FTP#get (binary mode)
fails:Net::FTP#get (text mode) sends the RETR command to the server
fails:Net::FTP#get (text mode) returns nil
fails:Net::FTP#get (text mode) saves the contents of the passed remote file to the passed local file
@@ -1 +1 @@
critical:Net::FTP#getbinaryfile
fails:Net::FTP#getbinaryfile
@@ -1 +1 @@
critical:Net::FTP#retrbinary
fails:Net::FTP#retrbinary

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Expand Up @@ -49,10 +49,15 @@ internal class SocketStream : System.IO.Stream {
}

public override void Flush() {
if (_internalWriteBuffer.Count == 0) {
return;
}

byte[] bufferedData = _internalWriteBuffer.ToArray();
int bytesSent = _socket.Send(bufferedData);
if (bytesSent < bufferedData.Length) {
// TODO: Resend the rest
System.Diagnostics.Debug.Assert(false, "Partial data sent");
}
_internalWriteBuffer.Clear();
}
Expand Down Expand Up @@ -119,6 +124,7 @@ internal class SocketStream : System.IO.Stream {
Flush();
}
}
Flush();
}
}
}
Expand Down

0 comments on commit 74d580c

Please sign in to comment.