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?
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?