Closed AnJ-Github closed 4 years ago
Hi @Gumaa thank you for your report !
Do you think adding a (c *Client) Close() func
would be good ?
I can see kolo/xmlrpc
doesn't implement Close()
func but rpc does https://golang.org/src/net/rpc/client.go#L284.
If it is ok, please open an MR with fix :)
Do you think adding a (c *Client) Close() func would be good ?
I was looking up to this actually.
I could try fixing this but I'm not sure if I will be able to.
imo just closing rpc Client would be enough. So it is :
func (c *Client) Close() error {
return c.client.Close()
}
btw we should probably changed client
field (from Client struct
) to xmlrpc
so that it wouldn't be confusing
@Gumaa Closing it since it's now implemented (see https://github.com/skilld-labs/go-odoo/blob/master/odoo.go#L58).
I couldn't find any way to close off the connection and corresponding goroutine. If I need to send request with different credentials than the last time it leaves previous connection hanging and it leads to goroutine leak and in consequence memory leak.
I’m not sure if this could be solved in this package or it is problem with dependency
kolo/xmlrpc
(or I'm simply missing something).