Fix SSL_shutdown error printed. BUGZ-4138
Begin arcbot message
This merge request is automatically cherrypicked from !1643 (merged) from source branch https://source.coderefinery.org/aleksandr.konstantinov/arc/-/tree/bug_4138 orginally made by @aleksandr.konstantinov .
The original MR went to branch: https://source.coderefinery.org/nordugrid/arc/-/tree/next
End arcbot message
Call SSL_shutdown only if connection was successful.