jgauffin / Griffin.Framework

Application framework for Business Applications
http://griffinframework.net
168 stars 62 forks source link

Close on TcpChannel blocks for 5 seconds needlessly #86

Closed chuckb closed 4 years ago

chuckb commented 6 years ago

This is more of a question than a bug per se, but I am using your network client class in an ASP.Net controller to call into a backend service. Once the controller is done, dispose gets called to clean up DI injected client classes. In dispose for my client class, I am calling dispose on the TcpChannelClient, which is ultimately closing the socket. But in the act of closing the socket, you put in an arbitrary 5 sec wait after the shutdown. Why not use disconnect, which only blocks until sending/receiving is done? Or if you are concerned with disconnect blocking forever, call close with a timeout?

jgauffin commented 4 years ago

Fixed in the new networking code.