zerowidth / camper_van

A Campfire to IRC bridge
MIT License
129 stars 25 forks source link

Duplicates #15

Closed rlpowell closed 12 years ago

rlpowell commented 12 years ago

So a bunch of us are using this at my work, and some of us (especially the people using irssi) pretty regularily get duplicated messages, where each campfire message will get sent to us 2 or more times (I've seen as much as five).

-Robin

zerowidth commented 12 years ago

Do you have the most recent versions of all the gems involved? I saw this occasionally when using this a year or so ago, but wasn't able to reliably reproduce it.

alindeman commented 12 years ago

I observed this after /parting a channel (room) and rejoining it later.

mdz commented 12 years ago

I see this regularly as well. I'm using camper_van via an IRC proxy (bip), which is always connected to it, but I regularly disconnect and reconnect from IRC clients.

I'm using current camper_van from git and current versions of all gems

technomancy commented 12 years ago

I can confirm that this is caused by /part not being honored.

mdz commented 12 years ago

I think the issue is actually due to JOIN being honored for channels which we're already in. I made a naive attempt at a fix and it seems to have worked.

alindeman commented 12 years ago

Are you going to make a pull request with it?

Andy Lindeman Sent from a mobile device. Please excuse the brevity and top reply.

On Tuesday, August 7, 2012 at 20:13, Matt Zimmerman wrote:

I think the issue is actually due to JOIN being honored for channels which we're already in. I made a naive attempt at a fix and it seems to have worked.

— Reply to this email directly or view it on GitHub (https://github.com/aniero/camper_van/issues/15#issuecomment-7571360).

zerowidth commented 12 years ago

Thanks for digging into this, guys! @mdz if you have a patch, even if it's hacky, I'd take a look at it.

mdz commented 12 years ago

It's linked above: https://github.com/aniero/camper_van/issues/15#commits-ref-48594da

On Wed, Aug 08, 2012 at 06:59:18AM -0700, Nathan Witmer wrote:

Thanks for digging into this, guys! @mdz if you have a patch, even if it's hacky, I'd take a look at it.


Reply to this email directly or view it on GitHub: https://github.com/aniero/camper_van/issues/15#issuecomment-7584266

zerowidth commented 12 years ago

@mdz thanks for the patch, I didn't see it earlier. I think I've solved it at a lower level, preventing the basic message stream from being started twice. I left the channel join alone so irc clients can get an updated user list and topic still on a second join.

Let me know if my patch fixes it -- it's in the bugfix/multiple_joins branch.

mdz commented 12 years ago

I backed out my fix, and applied yours, and now I have duplicates again. Unfortunately it looks like it doesn't fix the problem (at least for me).

On Thu, Aug 09, 2012 at 04:55:35AM -0700, Nathan Witmer wrote:

@mdz thanks for the patch, I didn't see it earlier. I think I've solved it at a lower level, preventing the basic message stream from being started twice. I left the channel join alone, so irc clients can get an updated user list and topic still on a second join.

Let me know if my patch fixes it -- it's in the bugfix/multiple_joins branch.


Reply to this email directly or view it on GitHub: https://github.com/aniero/camper_van/issues/15#issuecomment-7612069

alindeman commented 12 years ago

Did not fix duplicates for me either.

zerowidth commented 12 years ago

There's still a bug in my code, but I'm also having a hell of a time with EventMachine. Doesn't seem the streaming requests to the campfire API are being closed on request, and I'm still trying to figure out why. Once I figure that out, I'll be able to fix this properly!

alindeman commented 12 years ago

Thanks @aniero!

zerowidth commented 12 years ago

Alright, I'm punting on it. Don't know what's broken with EM / em-http-request, but they're older versions of the libraries anyway. I've pushed a new version of camper_van that has a modified version of @mdz's fix, plus what I tried before. It's not ideal, since it relies on correct behavior from irc clients when it sends messages for channels you're no longer supposed to be in, but it should work!