Closed Bug 383976 Opened 17 years ago Closed 17 years ago

[FIX]Eliminate oscillations when caller reads multiplex stream with ReadSegments

Categories

(Core :: XPCOM, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

Right now, doing a file upload does oscillating packet size requests because we start with our 4KB block boundary not lined up with the file and then end up sending packets of size X and 4096 - X down the pipe.  See bug 378629 for the nitty-gritty discussion.
Blocks: 137155
Attached patch Possible patchSplinter Review
This seems a little evil, but works....
Attachment #267913 - Flags: superreview?
Attachment #267913 - Flags: review?(cbiesinger)
Attachment #267913 - Flags: superreview? → superreview?(darin.moz)
Note that this increases the number of short reads caused by buffered streams, which makes bug 387588 more likely to bite.  Fix is posted there, though.
Assignee: nobody → bzbarsky
Depends on: 387588
Summary: Eliminate oscillations when caller reads multiplex stream with ReadSegments → [FIX]Eliminate oscillations when caller reads multiplex stream with ReadSegments
shouldn't Read also reset mBlockNextReadSegments to false, like Seek?

+    return aEventTarget->Dispatch(runnable, nsIEventTarget::DISPATCH_NORMAL);

aEventTarget may be null...

and what if no data is available in the stream?
Comment on attachment 267913 [details] [diff] [review]
Possible patch

marking r-, the asyncWait implementation is incorrect
Attachment #267913 - Flags: review?(cbiesinger) → review-
After talking to biesi, we're going to just take the patch in bug 137155 on trunk and hope that the NSS changes have made bug 334142 go away.  That patch really does give us the behavior we want.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Attachment #267913 - Flags: superreview?(darin.moz) → superreview-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: