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

Fixes SSL timeouts when running Pode in PS7.4+ #1379

Merged
merged 3 commits into from
Aug 30, 2024
Merged

Conversation

Badgerati
Copy link
Owner

Description of the Change

Refactors the .NET Socket receiver and SslStream logic so that they are compliant with I/O changes made in .NET8. The changes are also recommended from .NET6 as well.

While this refactor resolves the primary "HTTPS timeout" issue when running Pode in PS7.4+, there is a more than likely chance that this change will resolve other issues as well.

  • Instead of using Socket.ReceiveAsync, once a Socket has connected and been Accepted, Pode defaults straight to calling ReadAsync on the NetworkStream - or SslStream for any SSL connections
  • A lot of logic has now been moved to using .NET's await/async pattern
  • Other parts of the code have been simplified and refactored to be more efficient

This change does impact HTTP, WebSockets, SMTP, and TCP endpoints.

Related Issue

Resolves #1291
Resolves #977

@Badgerati Badgerati added this to the 2.11.0 milestone Aug 29, 2024
@Badgerati Badgerati self-assigned this Aug 29, 2024
@Badgerati Badgerati merged commit 9bd51aa into develop Aug 30, 2024
25 checks passed
@Badgerati Badgerati deleted the Issue-1291 branch August 30, 2024 08:21
@Badgerati Badgerati mentioned this pull request Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant