crash on Perlbal 1.51
Brad Fitzpatrick
brad at danga.com
Thu Nov 30 10:42:17 UTC 2006
I'll fix this nicely in a bit...
Travelling now, but I won't forget this. It's in my inbox (todo list).
On Thu, 30 Nov 2006, Mike Whitaker wrote:
>
> On 30 Nov 2006, at 08:49, Kevin Rosenberg wrote:
>
> > Del Raco wrote:
> >> I understand the first hack. Can you elaborate on the
> >> second one?
> >> [...]
> >>> + return if ref $client eq
> >>> "Perlbal::ClientHTTPBase";
> >>> +
> >>> # if our client's behind more than the max
> >>> limit, stop buffering
> >>> if ($client->too_far_behind_backend) {
> >>> $self->watch_read(0);
> >
> > The method too_far_behind_backend is sometimes called with $client
> > containing a Perlbal::ClientHTTPBase object which does not have that
> > method. So, it causes Perlbal to crash. It's a rather braindead
> > workaround the crash.
>
> Might I suggest that:
>
> if ($client->can('too_far_behind_backend') && $client-
> >too_far_behind_backend)
>
> might be a little more elegant and robust in the face of other
> objects with a similar problem suddenly appearing? :)
>
>
More information about the perlbal
mailing list