peers/peerjs

Error expected on DataConnection when not establishing a connection

Open

#924 aperta il 17 feb 2022

Vedi su GitHub
 (5 commenti) (7 reazioni) (0 assegnatari)TypeScript (1406 fork)batch import
clientfeaturehelp wanted

Metriche repository

Star
 (11.580 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

When a DataConnection fails to establish, for example, due to connecting to an invalid ID or to one's own ID, I would expect the dataConnection.on('error', () => {...}) callback to be executed. Instead, only peer.on('error', () => {}) catches such kinds of errors. This is especially annoying when you want to for example connect to multiple peers at once since we cannot know which one has failed to connect, making it hard to tell the user which peer(s) has issues.

Guida contributor