My server program uses this library to perform remote port forwarding with an SSH forwarding server. The client connects to the server through the SSH forwarding server. I need to close the session between the client and the server when the client actively closes the socket. Currently, the library only closes after a timeout. When I modify ChannelForwardedTcpip to add EndOfData handling, I can achieve the desired effect, as shown in the diagram. Could this modification cause any problems? For example: frequent creation and destruction of channels affecting performance? Resources not being properly released? Data not being fully transmitted before closing?
