frozencemetery / lurker

A well-mannered but not well-behaved useful IRC bot.
Other
1 stars 3 forks source link

The select bug #19

Open frozencemetery opened 9 years ago

frozencemetery commented 9 years ago
$ ./lurker.py irc.foonetic.net 6697 lurker lurker3 \#builds
loaded okay
autoloaded module: convo
autoloaded module: static
autoloaded module: alerts
autoloaded module: dice
autoloaded module: lastfm
autoloaded module: fml
autoloaded module: hug
autoloaded module: tfw
[N] == Connecting to remote server irc.foonetic.net:6697...
[N] == Connection successful.
=||> reload lastfm
=||> [N] [PD] Pingout (last pong sent = PD1488610, recvd = PD8081790)! Reconnecting
[N] == Disconnecting from remote server irc.foonetic.net...
[N] == Disconnected. Socket closed.
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, i
n __bootstrap_inner
    self.run()
  File "/Volumes/ServerDrive/NetUsers/robbie/lurker/irc/irclib.py", line 131, in run
    readable, writable, error = select.select(self.sockets.keys(),[],self.sockets.keys(), 1)
error: (9, 'Bad file descriptor')

[N] == Attempting reconnect
[N] == Connecting to remote server irc.foonetic.net:6697...
[N] == Connection successful.
[N] [PD] Client not connected yet, waiting

et cetera ad nauseam.

frozencemetery commented 7 years ago

Probably best to remove the reconnect logic entirely and just run the bot in a loop.