bibanon / itabashi

Itabashi (板橋) is a bridging bot that syncs messages between a Discord and an IRC channel.
GNU General Public License v2.0
18 stars 3 forks source link

Investigate how Discord.py / gIRC reconnect #4

Open DanielOaks opened 8 years ago

DanielOaks commented 8 years ago

We should optimally have the IM Managers reconnect automatically. I'm not 100% sure gIRC does this automagically yet, and I have absolutely no clue how Discord.py handles it, but we should see and correct this if they don't autoreconnect.

Yay logs from IRC:

irc: ita  -> ERROR :Closing Link: bibanon.discord.bouncer (Ping timeout: 240 seconds)
Connection closed
Task was destroyed but it is pending!
task: <Task pending coro=<run() running at /home/dan/itabashi/env/lib/python3.4/site-packages/websockets/protocol.py:302> wait_for=<Future pending cb=[Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.4/asyncio/tasks.py:394]>
Task was destroyed but it is pending!
task: <Task pending coro=<keep_alive_handler() running at /home/dan/itabashi/env/lib/python3.4/site-packages/discord/client.py:286> wait_for=<Future pending cb=[Task._wakeup()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<get() running at /usr/lib/python3.4/asyncio/queues.py:186> wait_for=<Future pending cb=[Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.4/asyncio/tasks.py:394]>
Task was destroyed but it is pending!
task: <Task pending coro=<main_task() running at /home/dan/itabashi/itabashi/discord.py:37> wait_for=<Future pending cb=[Task._wakeup()]>>
(env) 
DanielOaks commented 8 years ago

This is done for Discord, but I don't think IRC reconnects automagically yet. Will probably fix that upstream in the gIRC library rather than specifically in this bot.