Closed the-mikedavis closed 4 years ago
theorizing that the web/channels-setTopic
external call is slow enough to time out the socket, causing a reconnect which may result in multi-blanche.
no strong evidence, just seems like a likely candidate after skimming the code.
to test it, should remove this and the setTopic
call for the bought command, though we don't use that these days.
Commenting out some of the setTopic
calls avoids the timeout, but now we're seeing a java NPE when executing the choose
command.
{:source_team T1D2RFN9H, :event_ts 1563809481.007300, :channel D2BL4UD0V, :type message, :ts 1563809481.007300, :team T1D2RFN9H, :client_msg_id c7e40494-c72
9-4274-b91b-c38e357f02f7, :user_team T1D2RFN9H, :user U2A75S6A0, :suppress_notification false, :text choose hakkore}
----------------------------------------------------------------------------------------------------
Exception trying to handle slack message
{:source_team "T1D2RFN9H", :event_ts "1563809481.007300", :channel "D2BL4UD0V", :type "message", :ts "1563809481.007300", :team "T1D2RFN9H", :client_msg_id
"c7e40494-c729-4274-b91b-c38e357f02f7", :user_team "T1D2RFN9H", :user "U2A75S6A0", :suppress_notification false, :text "choose hakkore"}.
#<NullPointerException java.lang.NullPointerException>
java.lang.NullPointerException: null
at clojure.string$replace.invoke (string.clj:99)
clj_slack_client.rtm_transmit$linkify.invoke (rtm_transmit.clj:10)
clj_slack_client.rtm_transmit$say_message.invoke (rtm_transmit.clj:37)
lunch_bot.talk$say_message.invoke (talk.clj:236)
lunch_bot.core$distribute_message.invoke (core.clj:44)
lunch_bot.core$handle_message.invoke (core.clj:125)
lunch_bot.core$eval9069$fn__9071.invoke (core.clj:138)
clojure.lang.MultiFn.invoke (MultiFn.java:227)
lunch_bot.core$try_handle_slack_event.invoke (core.clj:157)
manifold.stream.Callback.put (stream.clj:432)
...
... more library stuff that's not lunch-bot
...
@tonyvanriet it's the text field with the doseq
distribute
in core.clj:125
(when (seq [])
:ok)
;=> nil
gives the nil in lunch-bot.command.reply:17
after choose, the bot does some reconnecting for a while and then can take
today
and friends