holepunchto / hyperdht

The DHT powering Hyperswarm
https://docs.holepunch.to
MIT License
323 stars 46 forks source link

(cleanup) consistently use SUSPENDED error in connect #203

Closed HDegroote closed 1 week ago

HDegroote commented 1 week ago

Currently, connect throws a SUSPENDED() error here: https://github.com/holepunchto/hyperdht/blob/c339c868be15c6096e9f7f30dd0445791f903392/lib/connect.js#L110. This PR makes it throw the same error for another case in the same function, for consistency.