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

protocols.indexOf('binary') >= 0 error #30

Closed
alexchandel opened this issue Dec 24, 2021 · 1 comment
Closed

protocols.indexOf('binary') >= 0 error #30

alexchandel opened this issue Dec 24, 2021 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@alexchandel
Copy link

websockify passes a bad argument to WebSocketServer. WebSocketServer's handleProtocols parameter is a function of type (protocols: Set<string>, request: IncomingMessage) => string | false. However you use the array method indexOf on protocols, and treat the second argument as a callback.

This causes websockify to crash immediately when a client connects.

@CendioOssman CendioOssman transferred this issue from novnc/websockify Dec 27, 2021
@CendioOssman
Copy link
Member

Please see #3.

@CendioOssman CendioOssman added the duplicate This issue or pull request already exists label Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants