uProxy-p2p icon indicating copy to clipboard operation
uProxy-p2p copied to clipboard

chrome sockets.tcp setPaused should pause before invoking callback

Open mollyling opened this issue 12 years ago • 2 comments

Problem

  • Currently sockets.tcp.setPaused() will immediately invoke its callback, even if there's a pending read() on the socket, that will cause an onReceive event to fire after the callback's complete.
  • You can't currently abort a read once it's in-flight, and there's no way to always be sure that all the data you're going to receive before pausing has been received.

Fix

  • Buffer received data when pausing
  • Return it when reading.

mollyling avatar Aug 14 '14 19:08 mollyling

  • Looks like Read() size isn't an issue for libNSS -- it's got a read loop to pull as much data as needed.
  • Currently diagnosing why libNSS is unhappy.

mollyling avatar Aug 28 '14 19:08 mollyling

We currently have a way to workaround this issue in our XMPP code, so changing this to P2 (not a must-have for web store launch)

dborkan avatar Oct 20 '14 19:10 dborkan