Merge remote branch 'brotherbard/experimental' into local branch 'bb/experimental'

This commit is contained in:
André Berg
2010-03-24 01:41:00 +01:00
149 changed files with 24136 additions and 5637 deletions
+8 -2
View File
@@ -36,8 +36,14 @@
while (n > 0) {
n = read(fd, buffer + bytesReceived++, 1);
if (n < 0)
[[NSException exceptionWithName:@"Socket error" reason:@"Remote host closed connection" userInfo:nil] raise];
if (n < 0) {
if (errno == EINTR) {
n = 1;
bytesReceived--;
} else {
[[NSException exceptionWithName:@"Socket error" reason:@"Remote host closed connection" userInfo:nil] raise];
}
}
if (bytesReceived >= bufferSize) {
// Make buffer bigger