connection.send() silently failed occasionally

63 views
Skip to first unread message

Yuanming Chen

unread,
Feb 28, 2019, 8:52:41 PM2/28/19
to PeerJS
I am new to PeerJS, and have used it to build an application to transmit data between two browsers. I noticed that once a while even though connection.send() has been called, the other browser will fail to receive the data. This normally happens 1 out of 20 calls. Peer object was created using default settings (in other words, I assume that reliable flag is true), thus I would assume that all send() calls should be successful as the payloads are not big at all (<1K per call). 

The two browsers ran on a single computer, thus I doubt the failure is related to a bad connection. Any thoughts on why send() call failed occasionally? Is there a way to detect errors if connection.send() fails? Are there any examples of doing retry with PeerJS? Thanks for your help in advance!
Reply all
Reply to author
Forward
0 new messages