On version 5.15.9, we had no problem. After upgrade, we now randomly have "network error, xxx refused" while closing and repeating an SFTP session. No problem with FTPS.
We were working on a testing scenario where we would connect to a server, then pull down the "session/disconnect session", and then connect to the same server again. After repeating this sequence several times successfully, repeating for the same remote server each time, randomly we get the "network error, refused" message. Repeating immediately after that, it worked ok for a few more tries. We noticed that the old menu option under "session" was "Disconnect". After upgrade, the choice is "Close session" instead of "disconnect". We tried all the versions available after 5.15.9, up to 5.17.2. All versions had the same problem. Going back to version 5.15.9 solved the problem.