If this implementation sometimes doesn't work is because of some issues with the discovery-swarm library. Fortunately, Hyperswarm was released recently. It implements a more reliable way of doing peer discovery. So, if you are experimenting issues try to use it now, this article pfrazee.hashbase.io/blog/hyperswarm about Hyperswarm includes a code example and here is the GitHub repo with some docs: github.com/hyperswarm/discovery.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
If this implementation sometimes doesn't work is because of some issues with the discovery-swarm library. Fortunately, Hyperswarm was released recently. It implements a more reliable way of doing peer discovery. So, if you are experimenting issues try to use it now, this article pfrazee.hashbase.io/blog/hyperswarm about Hyperswarm includes a code example and here is the GitHub repo with some docs: github.com/hyperswarm/discovery.