Skip to content
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

Resolved problem with StackOverflowException for .Net6.0 #703

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

michaelmeling
Copy link

Using StreamThreads library to flatten the recursion in receive. The flattened code has been put into StreamThreader.cs

Referencing issue #702

A fork has been created for a NET 6.0 build at https://github.com/michaelmeling/websocket-sharp

The StreamThreads library can be found at https://github.com/michaelmeling/StreamThreads

Michael Meling added 2 commits August 1, 2022 19:11
…eamThreads library to flatten the recursion in receive. The flattened code has been put into StreamThreader.cs
@BrMatheusLopes
Copy link

does not work with connection that starts with wss://

@michaelmeling
Copy link
Author

My bad, had cast _stream to NetworkStream, instead of just Stream, so SslStream failed.

@701982376509132690
Copy link

701982376509132690 commented Dec 7, 2022

With your fork Close( any args ) - server part, is not working.

@michaelmeling
Copy link
Author

@conspiracynomad Should be fixed

@701982376509132690
Copy link

701982376509132690 commented Dec 15, 2022

Now other issue, sometimes httpclient timeout happens

@michaelmeling
Copy link
Author

michaelmeling commented Dec 15, 2022 via email

@701982376509132690
Copy link

701982376509132690 commented Dec 15, 2022

from stacktrace it's related to httpclient with SendAsync

@701982376509132690
Copy link

Does this happen when you call Close(), or is it unrelated?

On Thu, 15 Dec 2022 at 10:13, conspiracynomad @.> wrote: Now other issue happens, sometimes http timeout happens — Reply to this email directly, view it on GitHub <#703 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDV75HNOX73BDWOAJSIY23WNLOMXANCNFSM55IOHZEA . You are receiving this because you authored the thread.Message ID: @.>

Also, yeah, issue with close not fully fixed, sometimes user connection not closes.

@Daniel-O-Reilly
Copy link

I don't think any of the code related to SendAsync or the sending functionality was modified in this PR. Do you have any sample code to reproduce this issue?

Is this issue reproducible on .NET 5 (or previous) using the normal websocket-sharp library without this PR?

@701982376509132690
Copy link

Does this happen when you call Close(), or is it unrelated?

On Thu, 15 Dec 2022 at 10:13, conspiracynomad @.> wrote: Now other issue happens, sometimes http timeout happens — Reply to this email directly, view it on GitHub <#703 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQDV75HNOX73BDWOAJSIY23WNLOMXANCNFSM55IOHZEA . You are receiving this because you authored the thread.Message ID: @.>

Apparently this happens because the connection does not have a timeout, try, for example, to connect from the client to the server, then let's say turn on the VPN, or turn off the Internet so that your connection breaks down, the bottom line is that the connection will remain "alive" after that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants