Closed PhillippOhlandt closed 6 years ago
Short workaround is to just let it crash™.
def handle_disconnect(_reason, state) do
raise Foo
{:reconnect, 5000, state}
end
@PhillippOhlandt it appears that the IRC adapter is not up-to-date with Hedwig 1.0. It's still using rc.3
. It's possible that it isn't handling those messages properly.
@scrogson Ah that could explain it. Unfortunately, I don't think the maintainer will update it anytime soon. I think about cloning it and making a special version for the Slack IRC Bridge.
BTW, how is Hedwig 2.0 going? I saw the PR.
@PhillippOhlandt I work with the author...I'll ask if he wouldn't mind updating it.
As for 2.0...I haven't had much time to work on it recently. But now that you're asking...I might try to find time to finish up that PR soon :wink:
No pressure, everything works fine right now (even with the reconnect workaround) :)
@PhillippOhlandt can we call this closed then?
@scrogson I think so since this needs to be fixed in the adapter (if not already).
Hey,
I am using Hedwig with the IRC adapter on a Slack channel. I noticed that Slack sometimes sends a
:disconnected
message which is unhandled. So I extended the IRC adapter with the following function:And my robot module contains:
So when I start the bot with a slightly wrong configuration (so Slack disconnects me right away) I get the following:
As you can see, my
handle_disconnect/2
function gets called but the bot itself does not reconnect.