cinchrb / cinch

The IRC Bot Building Framework
http://www.rubydoc.info/gems/cinch
MIT License
1k stars 180 forks source link

Sometimes on_channel handler receives message concatenated with other one #249

Open obfuscoder opened 6 years ago

obfuscoder commented 6 years ago

I have cinch bots running on multiple networks and channels. I spawn a new thread for each bot I create per network. Many of those channels are getting very many channel messages. I have several on_channel handlers with regular expression:

on :channel, /.../ do |m, match1, match2 ... |

My last matchgroup would usually contain the rest of the message.

Quite often this last match group contains not only the remainder of the message, but also another messag efollowing right afterwards without any linebreaks separating the two.

For me this looks like a race condition and it makes it quite difficult to create some kind of show case. At least I can tell so far that I don't get any handler thread inflations which happen when my handlers were too slow.