Only recover connection if it was NOT initiated by the application

Recovery should only happen if the application itself didn't explicitely
trigger the `close` functionality. Else the recovery mechanism would
prevent a complete disconnect in every case.