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

keepAlive not working with NIO #1502

Open
2 tasks done
mbarnach opened this issue Mar 24, 2020 · 0 comments
Open
2 tasks done

keepAlive not working with NIO #1502

mbarnach opened this issue Mar 24, 2020 · 0 comments

Comments

@mbarnach
Copy link
Member

Context and Description

When building Kitura with NIO, the keepAlive option is causing a crash of the server.

Environment Details

Tried on MacOS 10.15.3, with Swift 5.1.3 using Kitura 2.9.1.

Steps to Reproduce

  1. Create a Kitura server with NIO disabling the keepAlive option:
Kitura.addHTTPServer(onPort: 8080, with: router, keepAlive: .disabled)
  1. Every attempt to connect to the server will lead to a crash on KeepAliveState.swift line 40

This issue can also be reproduced by setting the keepAlive to .limited(maxRequests: X) and trying to connect X+1 time to the server.

It worth noting that this issue doesn't affect the non NIO version of Kitura.

Expected vs. Actual Behaviour

  • Not crashing and leaving the connection alive if possible.
  • Crash!
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

No branches or pull requests

1 participant