Open leedo opened 12 years ago
Does this look sane to you all? A couple things I wasn't sure about
I need to think about this some more. It looks like it should work but I don't like the string matching on Broken pipe (why only that? I'm also confused where the error comes from -- line 308 doesn't actually use $err that I can see)
The reason I limited to Broken pipe errors was because I don't think we should reconnect on protocol errors (I think those could end up there).
Re: $err, I would think croak should pass in $err instead of $res on line 308. /cc @chipdude
This adds a
reconnect
option that will re-queue commands and try to reconnect when the connection breaks. Might be worth adding some timing options for increasing the time between reconnect attempts.