Support ipv6 binding for connection server
This commit is contained in:
parent
f42d088fbc
commit
7c97e37dc3
1 changed files with 6 additions and 1 deletions
|
@ -90,8 +90,13 @@ class ConnectionServer(object):
|
||||||
))
|
))
|
||||||
try:
|
try:
|
||||||
self.pool = Pool(500) # do not accept more than 500 connections
|
self.pool = Pool(500) # do not accept more than 500 connections
|
||||||
|
if helper.getIpType(self.ip) == "ipv6":
|
||||||
|
sock_address = (self.ip, self.port, 0, 0)
|
||||||
|
else:
|
||||||
|
sock_address = (self.ip, self.port)
|
||||||
|
|
||||||
self.stream_server = StreamServer(
|
self.stream_server = StreamServer(
|
||||||
(self.ip, self.port), self.handleIncomingConnection, spawn=self.pool, backlog=100
|
sock_address, self.handleIncomingConnection, spawn=self.pool, backlog=100
|
||||||
)
|
)
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
self.log.info("StreamServer bind error: %s" % err)
|
self.log.info("StreamServer bind error: %s" % err)
|
||||||
|
|
Loading…
Reference in a new issue