diff --git a/nemubot/bot.py b/nemubot/bot.py index d83f22e..d5510a7 100644 --- a/nemubot/bot.py +++ b/nemubot/bot.py @@ -138,17 +138,17 @@ class Bot(threading.Thread): fnd_smth = False # Looking for invalid server for r in _rlist: - if not hasattr(r, "fileno") or not isinstance(r.fileno(), int) or r.fileno() == -1: + if not hasattr(r, "fileno") or not isinstance(r.fileno(), int) or r.fileno() < 0: _rlist.remove(r) logger.error("Found invalid object in _rlist: " + r) fnd_smth = True for w in _wlist: - if not hasattr(w, "fileno") or not isinstance(w.fileno(), int) or w.fileno() == -1: + if not hasattr(w, "fileno") or not isinstance(w.fileno(), int) or w.fileno() < 0: _wlist.remove(w) logger.error("Found invalid object in _wlist: " + w) fnd_smth = True for x in _xlist: - if not hasattr(x, "fileno") or not isinstance(x.fileno(), int) or x.fileno() == -1: + if not hasattr(x, "fileno") or not isinstance(x.fileno(), int) or x.fileno() < 0: _xlist.remove(x) logger.error("Found invalid object in _xlist: " + x) fnd_smth = True