closing old websocket server instances without errors
im trying to implement a ping pong logic combined with an ip rate limiter
i created a Map() like so
trying to account for client attacks where they initiate multiple connection via. dev console. for example running
const websocket = new WebSocket('ws://localhost:8787/websocket');
repeatedly. my ip rate limiter handles the spam. but how can i clean up the previous instantiated server without errors?
ipInfo.serverInstance.close
works as expected
but when client starts a new connection, server gets this error:
any way to get rid of this? i can't seem to find the source of this error.
sorry for wall of post1 Reply
any help would be appreciated!
ahh got answer from github