bug: peerclose fires without emitting peerconnect
See original GitHub issueIf a peer fails to connect [not sure why that happens yet], it will emit close, without ever emitting peerconnect
This case needs to be considered
code:
const map = {}
p2pcf.on('peerconnect', peer => {
map[peer.id] = true
})
p2pcf.on('peerclose', peer => {
if (map[peer.id]) {
// handle
} else {
// this should never occur but does
}
})
should there be a separate event for failed to init peer?
Issue Analytics
- State:
- Created a year ago
- Comments:15 (14 by maintainers)
Top Results From Across the Web
call.on("close") not triggered · Issue #636 · peers/peerjs - GitHub
I found a way that worked for me, I'm using peerjs alongside socket.io, so when i kill the call by peer.close(), I then...
Read more >Why am I missing events from fromEvent? - Stack Overflow
I think I've solved this. The problem appears to be that any elements that, if the peer emits 'connnection' before it emits 'open', ......
Read more >Relay - Go Packages
ion-sfu supports relaying tracks to other ion-SFUs or other services using the ORTC API. Using this api allows to quickly send the stream...
Read more >rpep - npm
2.0.1 - Fixing bug where emitted errors were silently ignored if no listeners were attached to an RPEP connection or server. 2.0.0 -...
Read more >JavaScript SDK | API Reference - SkyWay
SkyWay is a multi-platform SDK that allows you to easily implement video and voice calling functionality.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yielded true, false, false, true, but this is a sample size 1 of 10, so take it with a grain of salt the end user was doing nothing, just sitting there watching console, no interactions with the app or OS, no other [significant] apps in the background etc
Their IP didn’t change, and I’m not sure
The reason I wanted a peerstart or peercreate event is because there’s no way for me to listen to ice state events from p2pcf without modifying it
I think this issue should be fixed now so going to close. If another scenario comes up where it’s desirable to have additional events regarding peer state please open another one - I will be probably updating
start()
to both await on the initial POST response and return a data structure describing the state of the room wrt existing peers.