site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com On Dec 19, 2007, at 11:22 AM, Duane Murphy wrote: SimpleUserClient works just fine when the user side closes the connection. I want to close the connect _from_ the provider. That is, the provider is tracking user clients and has determined that the user client needs to be closed, what do I do? I am having some luck with terminate() but some things still seem like they are not working correctly. In the provider, if (userClient->terminate(this, options)) ... ~HTH -- Shaun Wexler MacFOH http://www.macfoh.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com Your userclient must maintain its own state and + retain count while it's being torn down in phases. This means the user-space clients watch for their service being terminated, and close their connections immediately. The userclient should delay its teardown during didTerminate(), and call that function itself once all clients have been closed, which will then cause the stop thread to be scheduled. smime.p7s