ObjectDisposedException while connecting ssh
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- csharp
- Lĩnh vực
- networking
Hướng nghiên cứu
Bắt đầu trong src/Renci.SshNet/Abstractions/SocketAbstraction.cs tại Connect(IPEndPoint remoteEndpoint, TimeSpan connectTimeout). Theo dõi callback ManualResetEvent.Completed và vòng đời của ManualResetEvent xung quanh timeout và việc dispose. Hoàn thành khi ObjectDisposedException được báo cáo không còn xảy ra trong quá trình kết nối qua SSH, kể cả khi kết nối hoàn tất gần thời điểm dispose.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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!
- Ngôn ngữ chính
- C#
- Star
- 4.4k
- Fork
- 993
- Merge trung bình
- 9 ngày 21 giờ
- Pull request đã merge (30 ngày)
- 1
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sshnet/SSH.NET
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Using SshClient on Linux under Wine throws System.Security.Cryptography.CryptographicException Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
Tất cả issue của sshnet/SSH.NET
Issue tương tự
-
bug documentation frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
azurenoops/spin_agent#975 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SubtitleEdit/subtitleedit#15108 · 1 bình luận ·
-
area/docs-content Bug pulumi/docs
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 94/100