简体   繁体   中英

Dangling thread in wcf callback

I have wcf service that calls back a client after finishing some job.
I have a couple of simple questions.
If my client crashes or I close client app before the service finished it's job, what happens with the service side thread and callback object it was passed to it from the client?
Do I need to have some safety net in these situations in order for service to work correctly with the future client requests after this situation has happened?

When you try to create the channel with the Client, you will probably get a CommunicationException since your client's endpoint is not listening anymore.

Just add some exception handling and do the proper actions. For example, if you get an exception you can kill the thread, try to establish connection again, etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM