Browse Source

log if no user

dev
破娃酱 8 years ago
parent
commit
e1aa68029d
  1. 4
      db_transfer.py
  2. 2
      shadowsocks/tcprelay.py

4
db_transfer.py

@ -311,6 +311,8 @@ class DbTransfer(TransferBase):
rows = self.pull_db_users(conn) rows = self.pull_db_users(conn)
conn.close() conn.close()
if len(rows) == 0:
logging.warn('no user in db')
return rows return rows
def pull_db_users(self, conn): def pull_db_users(self, conn):
@ -517,5 +519,7 @@ class MuJsonTransfer(TransferBase):
except Exception as e: except Exception as e:
logging.error(e) logging.error(e)
if len(rows) == 0:
logging.warn('no user in json file')
return rows return rows

2
shadowsocks/tcprelay.py

@ -114,7 +114,7 @@ class TCPRelayHandler(object):
config['method']) config['method'])
except Exception: except Exception:
self._stage = STAGE_DESTROYED self._stage = STAGE_DESTROYED
logging.error('creater encryptor fail at port %d', server._listen_port) logging.error('create encryptor fail at port %d', server._listen_port)
return return
self._encrypt_correct = True self._encrypt_correct = True
self._obfs = obfs.obfs(config['obfs']) self._obfs = obfs.obfs(config['obfs'])

Loading…
Cancel
Save