networking scalability tweak

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31449 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2010-09-30 14:16:11 +00:00
parent 8626d28eb3
commit 5c568fd7bb
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2010-09-30 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSFileHandle.m:
Increase the backlog for the listen() call to allow more incoming
network connections.
2010-09-30 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSURLProtocol.m: Remove excess release pointed out by

View file

@ -920,7 +920,9 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
return nil;
}
if (listen(net, 256) == -1)
/* We try to allow a large number of connections.
*/
if (listen(net, 10000) == -1)
{
NSLog(@"unable to listen on port - %@", [NSError _last]);
(void) close(net);