diff --git a/shadowsocks/server.py b/shadowsocks/server.py index 6ddd590..aa67303 100755 --- a/shadowsocks/server.py +++ b/shadowsocks/server.py @@ -41,8 +41,11 @@ def main(): daemon.daemon_exec(config) - import resource - logging.info('current process RLIMIT_NOFILE resource: soft %d hard %d' % resource.getrlimit(resource.RLIMIT_NOFILE)) + try: + import resource + logging.info('current process RLIMIT_NOFILE resource: soft %d hard %d' % resource.getrlimit(resource.RLIMIT_NOFILE)) + except ImportError: + pass if config['port_password']: pass