fix: wechatapp单例锁端口19528→19531 避免与qqapp/wecomapp冲突
This commit is contained in:
@@ -323,7 +323,7 @@ def on_message(bot, msg):
|
||||
threading.Thread(target=_handle, daemon=True).start()
|
||||
|
||||
if __name__ == '__main__':
|
||||
try: _lock = socket.socket(socket.AF_INET, socket.SOCK_STREAM); _lock.bind(('127.0.0.1', 19528))
|
||||
try: _lock = socket.socket(socket.AF_INET, socket.SOCK_STREAM); _lock.bind(('127.0.0.1', 19531))
|
||||
except OSError: print('[WeChat] Another instance running, exiting.'); sys.exit(1)
|
||||
_logf = open(os.path.join(os.path.dirname(os.path.dirname(__file__)), 'temp', 'wechatapp.log'), 'a', encoding='utf-8', buffering=1)
|
||||
sys.stdout = sys.stderr = _logf
|
||||
|
||||
Reference in New Issue
Block a user