Phil Jones
8/15/2004 12:45:00 AM
I have a situation where I'm attaching to events on the client to a Remote
(singleton) object on the server.
The problem is if I close the client, the delegate reference still exists
within the server object, and when the event fires, and the server object
attempts to process all of the event delegates in it's list - it fails
(SocketException: No Connection) when processing the delegate of the closed
client.
I wonder: what is the correct or generally accepted approach to this
scenario?
Should clients un-register their events before closing (if so, what if the
client crashes)?
Or, is there a common design pattern on for the server??
I can error handle this on the server - but I was just checking if there was
a "YOU SHOULD BE DOING THIS" solution here.
Cheers everyone!