chuckremes / ffi-rzmq

FFI bindings for ZeroMQ so the library can be used under JRuby and other FFI-compliant ruby runtimes
242 stars 62 forks source link

Removing from poller fails #54

Closed TvL2386 closed 12 years ago

TvL2386 commented 12 years ago

Hi chuckremes,

I'm having issues deregistering sockets. I've created a gist to show a minimalistic reproduce case: https://gist.github.com/2895395

It seems the socket I want to deregister doesn't go away. Am I doing something wrong or is it a bug?

Kind regards, Tom

chuckremes commented 12 years ago

Tom, give it another try using github master. When I run your code, it produces the expected output. Let me know how it goes so I can close the issue.

A new release is coming up soon, so if this is still a real problem then I would like to fix it. Thanks for your help. :)

TvL2386 commented 12 years ago

Using github master fixes it. Do you know which commit solves it?

chuckremes commented 12 years ago

Yes, take a look here:

https://github.com/chuckremes/ffi-rzmq/commit/9755a287c86852e7f11a18b2d5665a2c4a430b2e

I apparently fixed this bug in master about 5 months before you reported it. :)

I'll try to be better about getting gem releases out there so folks don't stumble across bugs that are long fixed in my repository.

TvL2386 commented 12 years ago

Hi Chuck,

Thanks a lot! I hope you'll succeed on being better at gem releases! :) Would have saved me a lot of time and bug fixing. For some reason my worker kept dying if it tried to do a reconnect (> 1 socket in the poller).

Anyways, will your upcoming 0.9.6 release break stuff? Or can I safely update to it?

chuckremes commented 12 years ago

If you were running from github master, then you won't see any breakage. If you are using the last released gem (0.9.3) then you'll see breakage with the Socket#send and Socket#recv calls. In order to simultaneously support both zeromq 2.x and 3.x, this breakage was necessary.

You'll need to update those calls to use Socket#sendmsg and Socket#recvmsg. That's a fairly minor change so hopefully it won't be too difficult.

If you have questions, I'm almost always on the #zeromq irc channel (freenode.net) for live help. I'm in Chicago, so figure out the daytime hours (roughly 8am until 5pm) to find me live, or just leave me a message in channel for "cremes."

On Aug 3, 2012, at 6:58 AM, Tom van leeuwen wrote:

Hi Chuck,

Thanks a lot! I hope you'll succeed on being better at gem releases! :) Would have saved me a lot of time and bug fixing. For some reason my worker kept dying if it tried to do a reconnect (> 1 socket in the poller).

Anyways, will your upcoming 0.9.6 release break stuff? Or can I safely update to it?


Reply to this email directly or view it on GitHub: https://github.com/chuckremes/ffi-rzmq/issues/54#issuecomment-7481736

TvL2386 commented 12 years ago

Hi Chuck,

Thanks for explaining! That's indeed a minor change. I see I'm using the recv_strings and send_strings methods. Those aren't broken in the new release?

chuckremes commented 12 years ago

No, those should continue to work as before.

Why not clone the current master and try it out? I am working on a few more minor fixes but what is there should be very solid. Let me know how it goes.

On Aug 3, 2012, at 7:47 AM, Tom van leeuwen wrote:

Hi Chuck,

Thanks for explaining! That's indeed a minor change. I see I'm using the recv_strings and send_strings methods. Those aren't broken in the new release?


Reply to this email directly or view it on GitHub: https://github.com/chuckremes/ffi-rzmq/issues/54#issuecomment-7482539

TvL2386 commented 12 years ago

Hi Chuck,

I cloned your repo, built ffi-rzmq-0.9.5. Then I updated my own gem to depend on that version of ffi-rzmq and everything works.

Kind regards, Tom

chuckremes commented 12 years ago

Fantastic.

On Aug 3, 2012, at 8:32 AM, Tom van leeuwen wrote:

Hi Chuck,

I cloned your repo, built ffi-rzmq-0.9.5. Then I updated my own gem to depend on that version of ffi-rzmq and everything works.

Kind regards, Tom


Reply to this email directly or view it on GitHub: https://github.com/chuckremes/ffi-rzmq/issues/54#issuecomment-7483376