ObjectDisposedException while connecting ssh
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- csharp
- Ambito
- networking
Direzione di ricerca
Inizia in src/Renci.SshNet/Abstractions/SocketAbstraction.cs, in Connect(IPEndPoint remoteEndpoint, TimeSpan connectTimeout). Segui il callback ManualResetEvent.Completed e il ciclo di vita di ManualResetEvent in relazione al timeout e alla disposizione. Il lavoro è completato quando l’ObjectDisposedException segnalata non si verifica più durante la connessione tramite SSH, anche quando la connessione viene completata in prossimità della disposizione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
sometimes I get an error while using ssh connection, it is the cause of crashed app, with the following log messages:
2019-09-16 10:04:22.710 OneLink.iOS[307:17928]
Unhandled Exception:
System.ObjectDisposedException: Safe handle has been closed
at System.Runtime.InteropServices.SafeHandle.DangerousAddRef (System.Boolean& success) [0x0001c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.14.0.114/src/Xamarin.iOS/mcs/class/corlib/System.Runtime.InteropServices/SafeHandle.cs:125
at System.Threading.NativeEventCalls.SetEvent (Microsoft.Win32.SafeHandles.SafeWaitHandle handle) [0x00002] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.14.0.114/src/Xamarin.iOS/mcs/class/corlib/System.Threading/NativeEventCalls.cs:61
at System.Threading.EventWaitHandle.Set () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/12.14.0.114/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/threading/eventwaithandle.cs:319
at Renci.SshNet.Abstractions.SocketAbstraction.ConnectCompleted (System.Object sender, System.Net.Sockets.SocketAsyncEventArgs e) [0x0000f] in :0
==========================================
I checked your codes, and I think that the problem in the function
public static Socket Connect(IPEndPoint remoteEndpoint, TimeSpan connectTimeout)
in file src/Renci.SshNet/Abstractions/SocketAbstraction.cs.
Maybe we must remove Completed callback function before disposing of ManualResetEvent.
Can you help me to check this issue?
Thanks so much!
- Lingua principale
- C#
- Stelle
- 4.4k
- Fork
- 993
- Merge medio
- 9g 21h
- PR unite (30g)
- 1
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.
Altre issue di sshnet/SSH.NET
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
-
Using SshClient on Linux under Wine throws System.Security.Cryptography.CryptographicException Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 67/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
Tutte le issue di sshnet/SSH.NET
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
azurenoops/spin_agent#975 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SubtitleEdit/subtitleedit#15108 · 1 commento ·