I create a ssh tunnel with port forward to connect to a posgres and works well. However when i try to stop a port forwarding the connections makes still exist even if I call the SSClient.disconnect, I reviewed the code and notice that when a socket is assigned to the channel the reference to that socket is lost from the portforwarded class. When i try to stop the port forwarding the sockets is still connected. I add a list for the sockets accepted to track them and call socket.close in every socket made by the portforwarding class in the stop method. Now when call the PortForward.Stop this close all sockets made by this class (the listener). How can show the changes that I made to de code? Regards
↧