Allowed for correct closing of transport and sftp threads