From 176e97bb452d5715417a6e9e7cb87a2ff68a935f Mon Sep 17 00:00:00 2001 From: fa08c <0xfa08c@gmail.com> Date: Thu, 8 Jan 2015 11:03:12 +0800 Subject: [PATCH] Fixing some minor issues --- shadowsocks/crypto/ctypes_openssl.py | 2 +- shadowsocks/eventloop.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shadowsocks/crypto/ctypes_openssl.py b/shadowsocks/crypto/ctypes_openssl.py index 9e0dfca..5ddff15 100644 --- a/shadowsocks/crypto/ctypes_openssl.py +++ b/shadowsocks/crypto/ctypes_openssl.py @@ -83,9 +83,9 @@ def load_cipher(cipher_name): class CtypesCrypto(object): def __init__(self, cipher_name, key, iv, op): + self._ctx = None if not loaded: load_openssl() - self._ctx = None cipher = libcrypto.EVP_get_cipherbyname(cipher_name) if not cipher: cipher = load_cipher(cipher_name) diff --git a/shadowsocks/eventloop.py b/shadowsocks/eventloop.py index 55c30bb..2b2459f 100644 --- a/shadowsocks/eventloop.py +++ b/shadowsocks/eventloop.py @@ -234,7 +234,7 @@ class EventLoop(object): traceback.print_exc() for handler in self._handlers_to_remove: self._handlers.remove(handler) - self._handlers_to_remove = [] + self._handlers_to_remove = [] self._iterating = False