i have a WCF chat application that runs as a singleton service with concurrency set to single too.
The Server holds a dicitionary with the callbacks of all connected clients, whenever a client changes it's status or sends a message, the server loops through the dicitionary and broadcasts the message to all connected clients. So far everything works fine.
But i get in troubles, when one or more of the clients are no longer availiable because the client has crashed, the network connection has been removed or something similiar. In that case, the server tries to send the message to the client and blocks the application
until the send timout is reached. During this time, the server doesn't accept any other messages.
Now i'm looking for a good way to solve the problem. i decreased the send timeout to 10 seconds, but that's only a workaround. Could it help to change the concurrency mode to multiple and start a new thread for every callback?
What happens if to threads are using the same callback at the same time?
View Complete Post