[CalendarServer-changes] [2430] CalendarServer/trunk/twistedcaldav
source_changes at macosforge.org
source_changes at macosforge.org
Sun May 18 20:01:10 PDT 2008
Revision: 2430
http://trac.macosforge.org/projects/calendarserver/changeset/2430
Author: cdaboo at apple.com
Date: 2008-05-18 20:01:08 -0700 (Sun, 18 May 2008)
Log Message:
-----------
Allow the socket listen backlog argument to be set via the config file.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/config.py
CalendarServer/trunk/twistedcaldav/tap.py
CalendarServer/trunk/twistedcaldav/test/test_tap.py
Modified: CalendarServer/trunk/twistedcaldav/config.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/config.py 2008-05-19 02:24:00 UTC (rev 2429)
+++ CalendarServer/trunk/twistedcaldav/config.py 2008-05-19 03:01:08 UTC (rev 2430)
@@ -201,6 +201,8 @@
},
"ThreadPoolSize": 10,
+
+ "ListenBacklog": 50,
}
class Config (object):
Modified: CalendarServer/trunk/twistedcaldav/tap.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/tap.py 2008-05-19 02:24:00 UTC (rev 2429)
+++ CalendarServer/trunk/twistedcaldav/tap.py 2008-05-19 03:01:08 UTC (rev 2430)
@@ -697,7 +697,8 @@
httpService = internet.TCPServer(
int(port), channel,
- interface=bindAddress
+ interface=bindAddress,
+ backlog=config.ListenBacklog
)
httpService.setServiceParent(service)
@@ -713,7 +714,8 @@
httpsService = internet.SSLServer(
int(port), channel,
- contextFactory, interface=bindAddress
+ contextFactory, interface=bindAddress,
+ backlog=config.ListenBacklog
)
httpsService.setServiceParent(service)
Modified: CalendarServer/trunk/twistedcaldav/test/test_tap.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/test/test_tap.py 2008-05-19 02:24:00 UTC (rev 2429)
+++ CalendarServer/trunk/twistedcaldav/test/test_tap.py 2008-05-19 03:01:08 UTC (rev 2430)
@@ -399,7 +399,18 @@
self.assertEquals(len(tcpServers), 0)
self.assertEquals(len(sslServers), 0)
+ def test_listenBacklog(self):
+ """
+ Test that the backlog arguments is set in TCPServer and SSLServers
+ """
+ self.config['ListenBacklog'] = 1024
+ self.writeConfig()
+ service = self.makeService()
+ for s in service.services:
+ self.assertEquals(s.kwargs['backlog'], 1024)
+
+
class ServiceHTTPFactoryTests(BaseServiceMakerTests):
"""
Test the configuration of the initial resource hierarchy of the
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080518/7449f914/attachment.htm
More information about the calendarserver-changes
mailing list