-
Notifications
You must be signed in to change notification settings - Fork 30
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
Error While Disconnecting from Webscoket Client #73
Comments
It looks like you're not handling a certain condition. Can you provide a small sample of code which I can use to replicate the issue? |
Hi @mardommah , Can you please copy + paste the code so that I can try running it? I'd rather not have to re-type it. |
okay here's the code server.js `const express = require('express'); const app = express(); httpServer.on('upgrade', rpcServer.handleUpgrade); ` rpc.js ` const rpcServer = new RPCServer({ rpcServer.on('client', client => {
}); module.exports = rpcServer ` api.js `const express = require('express'); const serverRouter = express.Router(); serverRouter.use(express.json()) // when clients connect (after auth), store them in a Map based on their identity rpcServer.on('client', client => {
}); serverRouter.post('/reset/:cp', async (req, res, next) => {
}); module.exports = serverRouter` |
Hi @mardommah , I wasn't able to reproduce this issue with the code you've provided. I have attempted to connect a simple client to localhost:3002 but it does not trigger the error. Can you give me more details of how to reproduce the error you've reported, using this code? |
When trying to disconnect from websocket using postman or insomnia, always returning error like this
![image](https://private-user-images.githubusercontent.com/36487789/313704989-8b6b5389-792a-4c9b-a691-8edc4a6d46a9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMjY0ODIsIm5iZiI6MTczOTMyNjE4MiwicGF0aCI6Ii8zNjQ4Nzc4OS8zMTM3MDQ5ODktOGI2YjUzODktNzkyYS00YzliLWE2OTEtOGVkYzRhNmQ0NmE5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDAyMDk0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY2YWQyZmM4ZWM3NDgzMzYzYWU4ZDExZTkyYjIxYzk1NzI5OTg1Y2NmZmM3YjExNGY4ZjcyMDlkYzk2NWRiNDQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.YIGLhKKZx3VqfrZz4TilAP0rxXSXOa3iOA6ZPXLoxc0)
The text was updated successfully, but these errors were encountered: