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

Indicating a failed upgrade to WebSocket via shouldUpgrade #191

Open
pushkarnk opened this issue Apr 3, 2019 · 0 comments
Open

Indicating a failed upgrade to WebSocket via shouldUpgrade #191

pushkarnk opened this issue Apr 3, 2019 · 0 comments

Comments

@pushkarnk
Copy link
Contributor

The shouldUpgrade function passed to NIOWebSocket.WebSocketUpgrader is expected to return an EventLoopFuture<HTTPHeaders?> to indicate a successful or failed upgrade. On a successful upgrade, we return eventLoop.makeSucceededFuture(httpHeaders). But on a failed upgrade (may be because the requested websocket service doesn't exist), it may make sense to return a eventLoop.makeFailedFuture(<error>). The questions here are:
a. Does the NIOWebSocket.WebSocketUpgrader handle an error wrapped in a failed future?
b. What error value do we return?

cc @ianpartridge

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