miyagawa / AnyEvent-Redis

Asynchronous Redis client
http://search.cpan.org/dist/AnyEvent-Redis
41 stars 16 forks source link

Properly hold a strong reference to $self #26

Closed michaelfig closed 1 year ago

michaelfig commented 7 years ago

Hold a copy of $self in $cmd_cv until it is sent.

Without this patch, if an AnyEvent::Redis handle goes out of the caller's scope while commands are still pending, the old code doesn't keep $self alive, resulting in undefined $self errors for $self->_expect, or $self->all_cv.

michaelfig commented 1 year ago

Clearly no interest in this PR. I guess this package is dead.