beaucarnes / fcc-project-tutorials

freeCodeCamp video project tutorials.
296 stars 416 forks source link

Can you provide me with information about CLOSING WebSocket? #18

Closed danielkolesnik closed 5 years ago

danielkolesnik commented 5 years ago

Hello, @beaucarnes , thank you for, great tutorial! I know that it is not an issue, but I completely lost the moment in the video when you configure the closing of the web socket on the front-end side. I've tried to make it in componentWillUnmount of the root app component, but it seems to be not the correct way and it wasn't working... Can you make advice about where it will be better to do? Because when I'm reloading the page the ids continue increments so I conclude that web sockets are not closed.

danielkolesnik commented 5 years ago

That was my fault... On the server side, I made a mistake added action listener wss.on('close',...) instead of ws.on('close',...). Sorry for disturbing the peace :)

beaucarnes commented 5 years ago

@danielkolesnik Glad you figured it out!