peerjs icon indicating copy to clipboard operation
peerjs copied to clipboard

feat: emit error on connections when receiving "EXPIRE"

Open WofWca opened this issue 2 years ago • 2 comments

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.

WofWca avatar Aug 26 '23 16:08 WofWca

Hey @WofWca, thanks for working on this! I pushed some commits, I hope that's ok:

  1. Emit the error only if the target .peer of the connection matches
  2. Some basic tests

I don't think this will break something.

jonasgloning avatar Aug 26 '23 21:08 jonasgloning

Alright, looks like it's your MR now XD

WofWca avatar Aug 28 '23 08:08 WofWca