Merge pull request #47 from gbarr/memleak
When a job completes, remove its handler
This commit is contained in:
commit
1f303d8145
@ -145,12 +145,10 @@ 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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user