SftpPermissionDeniedException on Download when File Transfer in Progress
Nessuno ha ancora preso questa issue.
- Lingua principale
- C#
- Stelle
- 4.4k
- Fork
- 993
- Merge medio
- 9g 21h
- PR unite (30g)
- 1
Descrizione
When attempting to download a file that is being written to on the source SFTP file server, I'm getting a SftpPermissionDeniedException. We trap for the error and retry the download after a 15 s pause. However, even after the file has been closed on the SFTP server the same exception occurs in code when downloading the file. It seems like the status of the file isn't updated or an exception isn't getting cleared in the SSH.NET code on subsequent download attempts.
SftpClient.DownloadFile(path, stream, callback)
The only way I've gotten this to work is to call Disconnect on the SftpClient and then Connect before attempting the download again.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal punto di ingresso segnalato SftpClient.DownloadFile(path, stream, callback) e riproduci un download mentre il file remoto è in fase di scrittura, quindi riprova dopo che è stato chiuso. Traccia come viene gestita SftpPermissionDeniedException durante il retry e confronta il comportamento con la riconnessione del SftpClient. Il lavoro è completato quando un download successivo riesce senza disconnettersi e riconnettersi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- csharp
- Ambito
- networking
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100