webtorrent / webtorrent

⚡️ Streaming torrent client for the web
https://webtorrent.io
MIT License
29.68k stars 2.72k forks source link

fix: uTP error on setup #2892

Closed ThaUnknown closed 1 week ago

ThaUnknown commented 1 week ago

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update [x] Bug fix [ ] New feature [ ] Other, please explain:

What changes did you make? (Give an overview) it's possible for uTP to error on listen which disables utp, however it hangs the client indefinetly, as onListening never fired, this fixes that, the errors were also swallowed, thats not a good thing, tcp server logs its error on destroy, however utp server didnt! this was a bad implementation! Which issue (if any) does this pull request address? onListening is safe to fire right away on utp error, as utp can only error once tcp server has already started listening Is there anything you'd like reviewers to focus on?

ThaUnknown commented 1 week ago

this is also likely the cause of some tests hanging for a long time without erroring, this will resolve that issue, likely help us track down the issue in utp-native in the future, as the error is quite rare

webtorrent-bot commented 1 week ago

:tada: This PR is included in version 2.5.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: