From 7a1647278fc028bcb077fab2841d0d534f1c0a5a Mon Sep 17 00:00:00 2001 From: clowwindy Date: Sun, 1 Jun 2014 17:50:57 +0800 Subject: [PATCH] fix multiple servers --- shadowsocks/server.py | 6 +++--- test/server-multi-passwd.json | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/shadowsocks/server.py b/shadowsocks/server.py index b9b897e..a0b6dd7 100755 --- a/shadowsocks/server.py +++ b/shadowsocks/server.py @@ -56,9 +56,9 @@ def main(): a_config['password'] = password logging.info("starting server at %s:%d" % (a_config['server'], int(port))) - tcp_server = tcprelay.TCPRelay(config, False) + tcp_server = tcprelay.TCPRelay(a_config, False) tcp_servers.append(tcp_server) - udp_server = udprelay.UDPRelay(config, False) + udp_server = udprelay.UDPRelay(a_config, False) udp_servers.append(udp_server) def run_server(): @@ -96,7 +96,7 @@ def main(): # master for tcp_server in tcp_servers: - tcp_server.server_close() + tcp_server.close() for udp_server in udp_servers: udp_server.close() diff --git a/test/server-multi-passwd.json b/test/server-multi-passwd.json index 497c60a..eff5ed8 100644 --- a/test/server-multi-passwd.json +++ b/test/server-multi-passwd.json @@ -12,10 +12,7 @@ "8386": "foobar6", "8387": "foobar7", "8388": "foobar8", - "8389": "foobar9", - "8390": "foobar10", - "8391": "foobar11", - "8392": "foobar12" + "8389": "foobar9" }, "timeout": 60, "method": "aes-256-cfb"