The test worked by sleeping a certain time, then checking that the
difference between recv timestamps before and after the sleep was
within some margin of the requested sleep time.
However, this means that imprecision of SleepMs makes the test flaky.
This source of flakiness can be removed by comparing to the actual
time slept instead of the requested time.
Also making the margin larger, to further reduce the likelihood of
flakiness.
R=pthatcher@webrtc.org, stefan@webrtc.org
Review URL: https://codereview.webrtc.org/2111043004 .
Cr-Commit-Position: refs/heads/master@{#13733}
This helps a lot on Android devices where the user threads can be scheduled with low priority when the app is in the background, causing spurious significantly delayed before a packet can be read from the socket. With this patch the timestamp is taken by the kernel when the packet actually arrives.
R=juberti@chromium.orgTBR=juberti@webrtc.org
BUG=webrtc:5773
Review URL: https://codereview.webrtc.org/1944683002 .
Cr-Commit-Position: refs/heads/master@{#12850}
This CL fixes an issue where the "writable" flag didn't stay set after
::send or ::sendto only sent a partial buffer.
Also SocketTest::TcpInternal has been updated to use rtc::Buffer instead
of manually allocating data.
BUG=webrtc:4898
Review URL: https://codereview.webrtc.org/1616153007
Cr-Commit-Position: refs/heads/master@{#11480}
There is an issue in PhysicalSocket::Accept where the flag to continue
listening is not set in "enabled_events_" if "accept" returns an error.
This CL fixes this (initial idea by silviu.cpp@gmail.com).
BUG=webrtc:2030
Review URL: https://codereview.webrtc.org/1452903006
Cr-Commit-Position: refs/heads/master@{#11080}