mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Fixup _unusedData flag for server streams doing an accept.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23217 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
09394ba7d8
commit
53020cec58
3 changed files with 47 additions and 8 deletions
|
@ -354,6 +354,17 @@ static void setNonblocking(int fd)
|
|||
[super close];
|
||||
}
|
||||
|
||||
- (void) _dispatch
|
||||
{
|
||||
if ([self streamStatus] == NSStreamStatusOpen)
|
||||
{
|
||||
[self _sendEvent: NSStreamEventHasBytesAvailable];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"_dispatch with unexpected status %d", [self streamStatus]);
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation GSSocketInputStream
|
||||
|
@ -720,6 +731,17 @@ static void setNonblocking(int fd)
|
|||
return [super propertyForKey: key];
|
||||
}
|
||||
|
||||
- (void) _dispatch
|
||||
{
|
||||
if ([self streamStatus] == NSStreamStatusOpen)
|
||||
{
|
||||
[self _sendEvent: NSStreamEventHasSpaceAvailable];
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"_dispatch with unexpected status %d", [self streamStatus]);
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation GSSocketOutputStream
|
||||
|
@ -1364,6 +1386,7 @@ static void setNonblocking(int fd)
|
|||
socklen_t len = [ins sockLen];
|
||||
int acceptReturn = accept((intptr_t)_loopID, [ins peerAddr], &len);
|
||||
|
||||
_unhandledData = NO;
|
||||
if (acceptReturn < 0)
|
||||
{ // test for real error
|
||||
if (errno != EWOULDBLOCK
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue