mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
fix for handling stream connection failures
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23213 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
24251c6439
commit
71148081f7
3 changed files with 22 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-08-07 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/win32/NSStreamWin32.m:
|
||||||
|
* Source/unix/NSStream.m:
|
||||||
|
If a connection attampt fails, propogate error to sibling stream so
|
||||||
|
both streams in the pair get a failure.
|
||||||
|
|
||||||
2006-08-07 00:13-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
2006-08-07 00:13-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Source/NSData.m: Correct issue in initWithCoder: and encodeWithCoder:
|
* Source/NSData.m: Correct issue in initWithCoder: and encodeWithCoder:
|
||||||
|
|
|
@ -524,6 +524,8 @@ static void setNonblocking(int fd)
|
||||||
errno = error;
|
errno = error;
|
||||||
[self _recordError];
|
[self _recordError];
|
||||||
myEvent = NSStreamEventErrorOccurred;
|
myEvent = NSStreamEventErrorOccurred;
|
||||||
|
[_sibling _recordError];
|
||||||
|
[_sibling _sendEvent: myEvent];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -882,6 +884,8 @@ static void setNonblocking(int fd)
|
||||||
errno = error;
|
errno = error;
|
||||||
[self _recordError];
|
[self _recordError];
|
||||||
myEvent = NSStreamEventErrorOccurred;
|
myEvent = NSStreamEventErrorOccurred;
|
||||||
|
[_sibling _recordError];
|
||||||
|
[_sibling _sendEvent: myEvent];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1330,7 +1334,7 @@ static void setNonblocking(int fd)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SOCKET_BACKLOG 5
|
#define SOCKET_BACKLOG 256
|
||||||
|
|
||||||
- (void) open
|
- (void) open
|
||||||
{
|
{
|
||||||
|
|
|
@ -794,6 +794,11 @@ static void setNonblocking(SOCKET fd)
|
||||||
if (error)
|
if (error)
|
||||||
errno = error;
|
errno = error;
|
||||||
[self _recordError];
|
[self _recordError];
|
||||||
|
if (_sibling)
|
||||||
|
{
|
||||||
|
[_sibling _recordError];
|
||||||
|
[_sibling _sendEvent: NSStreamEventOpenCompleted];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1350,6 +1355,11 @@ static void setNonblocking(SOCKET fd)
|
||||||
if (error)
|
if (error)
|
||||||
errno = error;
|
errno = error;
|
||||||
[self _recordError];
|
[self _recordError];
|
||||||
|
if (_sibling)
|
||||||
|
{
|
||||||
|
[_sibling _recordError];
|
||||||
|
[_sibling _sendEvent: NSStreamEventOpenCompleted];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue