-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comapibility issue with .NET Core 2.0 Preview 2 #9
Comments
Thank you for using this! I do not know what kind of scene it will happen, so imagine and write. Once connected, Sharpcifs keeps holding the value of the local IP address at the time of connection. Execution order is: I hope that Google Translate will show you well! |
The problem is caused by the call to Socket.SendToAsync(args) in the Send method of SocketEx. The Completed event in SocketAsyncEventArgs never gets called, because (I am guessing) it is running synchronously as mentioned here ... https://blogs.msdn.microsoft.com/dotnet/2017/06/07/performance-improvements-in-net-core/ I read the source of socket.cs and whilst I think the boolean that SendToAsync sets might mean it ran synchronously, I'm not sure. If it is, just doing this in SocketEx.Send will fix the issue ... if (SendToAsync(args)) If not, replacing the whole method with this ... public void Send(byte[] buffer, int offset, int length, EndPoint destination = null)
definitely will. |
I am seeing the same behavior. You solution works perfectly. Thanks ! |
Thanks for your feedbacks! I could not reproduce in my own environment(Win10, .NetCore2.0 SDK), and, fix SocketEx.cs on dev-branch: I am glad if you try this code to see if it works correctly. |
Your environment is the same as mine. I am seeing the behaviour via a Windows .Net Core 2.0 Test Project. Interestingly, the problem does not happen in an Android deployment of the code. Your dev-branch SocketEx fixes the problem. I'm looking forward to you updating your nuget package so I can dispense with the local copy of the code. By the way - thanks for this project! |
I published now, new ver 0.2.10. thank you everyone! |
Does anyone still have a look at this issue? If problems also occur, I will resume this issue! |
I will update the package and let you know.
…On Wed, Oct 4, 2017 at 4:05 AM ume05rw ***@***.***> wrote:
Does anyone still have a look at this issue?
I could not reproduce this problem, so it's a bit indigestion...
If problems also occur, I will resume this issue!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABebZ7BDxc7DETm2k7jfN8lNX70rP5SZks5souf7gaJpZM4OyXj5>
.
|
Sorry for the late response. I can confirm that the new version works
without any issue!
…On Wed, Oct 4, 2017 at 8:07 AM Mehran Kordi ***@***.***> wrote:
I will update the package and let you know.
On Wed, Oct 4, 2017 at 4:05 AM ume05rw ***@***.***> wrote:
> Does anyone still have a look at this issue?
> I could not reproduce this problem, so it's a bit indigestion...
>
> If problems also occur, I will resume this issue!
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#9 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABebZ7BDxc7DETm2k7jfN8lNX70rP5SZks5souf7gaJpZM4OyXj5>
> .
>
|
Hello,
Thanks for this library it saved me a lot of time!
When connecting to a samba share I get this error as soon as I call ListFiles (or any other method). This only happens with dotnetcore 2.0-preview2 and the same code works without any issue on dotnetcore 1.1
I have also tried to set client IP by using
Config.SetProperty("jcifs.smb.client.laddr", ip);
but the issue persists.
Any advice?
Best Regards
The text was updated successfully, but these errors were encountered: