peerjs
peerjs copied to clipboard
feat: emit error on connections when receiving "EXPIRE"
Closes #924
TODO:
### TODO:
- [x] Update docs as well ("Be sure to listen on the [error](https://peerjs.com/docs/#peeron-error) event in case the connection fails.")
- [x] Think whether it breaks something (I'm not that deep into how PeerJS works).
- [ ] Address https://github.com/peers/peerjs/issues/924#issuecomment-1694381633 as well, or make an issue about it.
Hey @WofWca, thanks for working on this! I pushed some commits, I hope that's ok:
- Emit the error only if the target .peer of the connection matches
- Some basic tests
I don't think this will break something.
Alright, looks like it's your MR now XD