DEV Community

[Comment from a deleted post]
Collapse
 
valentinogagliardi profile image
Valentino Gagliardi

It should be clear that the article is merely intended as an example from where the reader should start experimenting on his own.

Also, the code is not intended to be used from multiple client as it is, obviously you should clear the interval if you were to handle multiple connections.

I write my articles with simplicity in mind and maybe I took for granted that some reader won't simply copy the code and past it into a production app.

By the way, thanks for pointing this out, I'll add a note to clarify the problem.