On Fri, Jan 08, 2010 at 03:50:36PM -0600, Shawn Walker wrote: > On 01/ 8/10 03:41 PM, [email protected] wrote: > >On Fri, Jan 08, 2010 at 02:45:50PM -0600, Shawn Walker wrote: > >>I keep thinking that the transport should be shutdown in some other > >>case too. > > > >Did you have any specific case in mind? When the client is done with > >the download, we're almost certainly done unless an informational > >operation is requested later by the GUI. > > Just the info/list cases. > > The one other case is where we prepare and evaluate the plan, but > pre-execute is never called because the user cancels before the plan > is executed. I could only see that possibly being an issue in the > GUI for the moment though since the CLI will exit if the plan isn't > executed.
Actually, you're right. There is a case that I missed. It's the API.reset() case. In that call the API creates a new Image object, which will also create a new Transport. This means that if the old transport has any connections still open, they'll also linger until the instance gets garbage collected. This is a little different from what you described, but it could be triggered by info/list cases, since they reset the API prior to performing a network operation. It would be great if the GUI reset the API at the end of their operations instead of the beginning, but they don't do that right now. I also realized that the transport lock should be held while calling reset and shutdown, since that manipulates the engine/libcurl. I'm posting a new webrev with the API and locking changes included. http://cr.opensolaris.org/~johansen/webrev-13746-2/ Thanks, -j _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
