Fixed argument checks in <transport_disconnect>
Fixed argument check in <tls_disconnect>
Merge pull request #1593 from akallabeth/transport_fixes

Transport disconnect fixes