From 9d2e042af3e986914647e77080a540ae994f1219 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Wed, 23 Apr 2014 19:49:17 +0800 Subject: [PATCH] fix gevent --- shadowsocks/server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shadowsocks/server.py b/shadowsocks/server.py index 4e582bb..70b6047 100755 --- a/shadowsocks/server.py +++ b/shadowsocks/server.py @@ -28,9 +28,8 @@ if sys.version_info < (2, 6): else: import json -# do this before monkey patch -import udprelay +# TODO remove gevent try: import gevent import gevent.monkey @@ -39,6 +38,7 @@ except ImportError: gevent = None print >>sys.stderr, 'warning: gevent not found, using threading instead' + import socket import select import threading @@ -48,6 +48,7 @@ import logging import getopt import encrypt import utils +import udprelay def send_all(sock, data):