mikespook/gearman-go — pull request #43 by draxil (2014-06-07 11:11:17+00:00)
Title: Handling disconnects

I read issue #6 and so decided to write a "disconnect test" which:

* runs gearmand
* connects to it with a worker
* kills gearmand

Using this I was able to determine that the error handler was not called from the agent on this kind of disconnect. I was able to determine the error for my disconnect flowed straight to:

https://github.com/mikespook/gearman-go/blob/master/worker/agent.go#L62

as neither the opErr.Timeout() or opErr.Temporary() functions returned true. If we're going to be able to handle disconnects as discussed in issue #6, we'll probably still need to pass this error to the error handler.

(also in here are some trivial improvements to the Work() without Ready() test which was slowing down the test runs)