snapdrop icon indicating copy to clipboard operation
snapdrop copied to clipboard

fix WSPeer

Open dacapoday opened this issue 3 years ago • 3 comments

whether WSPeer inherits from Peer as well as RTCPeer?

dacapoday avatar Jun 09 '22 03:06 dacapoday

What additional value does this PR bring? It seems the inheritance is not necessary as it works without it as well...

fm-sys avatar Jun 09 '22 07:06 fm-sys

What additional value does this PR bring? It seems the inheritance is not necessary as it works without it as well...

I think this is a very hidden problem when fallback to websocket send msg and it can be reproduced

Steps to reproduce

  1. force snapdrop fallback to websocket by breakpoint and change window.isRtcSupported=false Snipaste_2022-06-09_23-42-29

  2. then send msg and file failed and console raise error Snipaste_2022-06-09_23-43-17

This error means WSPeer not properly initialized. Its really only have _send method!!

dacapoday avatar Jun 09 '22 15:06 dacapoday

Ah, ok. Thanks for clarification and for helping to improve Snapdrop!

fm-sys avatar Jun 09 '22 16:06 fm-sys