When a job completes, remove its handler

This commit is contained in:
Graham Barr 2014-05-23 08:00:58 -05:00
parent d40888817d
commit 3e556edb2d

View File

@ -145,13 +145,11 @@ func (client *Client) processLoop() {
case dtWorkData, dtWorkWarning, dtWorkStatus: case dtWorkData, dtWorkWarning, dtWorkStatus:
resp = client.handleResponse(resp.Handle, resp) resp = client.handleResponse(resp.Handle, resp)
case dtWorkComplete, dtWorkFail, dtWorkException: case dtWorkComplete, dtWorkFail, dtWorkException:
resp = client.handleResponse(resp.Handle, resp) client.handleResponse(resp.Handle, resp)
if resp != nil {
delete(client.respHandler, resp.Handle) delete(client.respHandler, resp.Handle)
} }
} }
} }
}
func (client *Client) err(e error) { func (client *Client) err(e error) {
if client.ErrorHandler != nil { if client.ErrorHandler != nil {