I was not able to reproduce the issue here.
I have tested using DevForce 18.104.22.168. What version of DevForce are you using?
I did some testing with our WPF Push Notification sample and here's the outcome:
Once a client calls CancelCallback, the server should register in its DebugLog:
IdeaBlade.EntityModel.Server.NotificationServiceManager:UnregisterUser - User unregistered from _Service Name_
Once all clients subscribing to the notification service unsubscribe to it, the server will stop the notification service:
IdeaBlade.EntityModel.Server.NotificationThreadHelper:StopThread - Stopping thread for _Service Name_
IdeaBlade.EntityModel.Server.NotificationServiceManager:NotificationThreadCompleted - Server method completed: _Service Name_
I also verified that if the user closes the client app without unsubscribing to the service, the server will eventually remove the subscriber after a timeout: (1 min default)
IdeaBlade.EntityModel.Server.NotificationServiceManager:AsyncNotify - Removing subscriber after error The message could not be transferred within the
allotted timeout of 00:01:00. There was no space available in the reliable
channel's transfer window. The time allotted to this operation may have been a
portion of a longer timeout.
As for not unsubscribing upon calling CancelCallback, it can only think of not having the right token. Could you verify that the token is accurate?
Also, could you ensure there are no other subscribers to the notification service? (notificationManager.GetSubscribers(serviceKey).Count())