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

Delay on Ctrl-C with error: Could not stop HTTP server #7

Closed
MaxDesiatov opened this issue Jun 18, 2020 · 2 comments · Fixed by #85
Closed

Delay on Ctrl-C with error: Could not stop HTTP server #7

MaxDesiatov opened this issue Jun 18, 2020 · 2 comments · Fixed by #85
Labels
bug Something isn't working

Comments

@MaxDesiatov
Copy link
Collaborator

Currently, when attempting to stop the command-line invocation of carton with Ctrl-C, you get this error:

[ ERROR ] Could not stop HTTP server: Abort(identifier: "500", status: 
NIOHTTP1.HTTPResponseStatus.internalServerError, headers: , 
reason: "Server stop took too long.", 
source: Vapor.ErrorSource(file: "/private/tmp/carton-20200616-45672-cfefqh/carton-0.1.0/.build/checkouts/vapor/Sources/Vapor/HTTP/Server/HTTPServer.swift", function: "close()", line: 310, column: 31, range: nil))
ERROR: Cannot schedule tasks on an EventLoop that has already shut down. 
This will be upgraded to a forced crash in future SwiftNIO versions.

According to SwiftNIO, this doesn't seem to be an issue with SwiftNIO, probably caused by how Vapor uses their API. Upgrading to the latest version of Vapor is blocked by vapor/vapor#2385

@MaxDesiatov MaxDesiatov added the bug Something isn't working label Jun 18, 2020
@MaxDesiatov
Copy link
Collaborator Author

I'm wondering if this is related to open WebSocket connections. It seems that when no connections are established, there's no delay.

@MaxDesiatov
Copy link
Collaborator Author

The issue is still not fixed after updating to the latest version of Vapor, I've reported it here vapor/vapor#2451

MaxDesiatov added a commit that referenced this issue Aug 18, 2020
Resolve #7 as described in vapor/vapor#2451.

Additionaly, new formatting is applied with the new version of SwiftFormat.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant