Merge pull request #47 from gbarr/memleak

When a job completes, remove its handler
This commit is contained in:
Xing 2014-07-25 09:46:21 +08:00
commit 1f303d8145

View File

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