Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle EAGAIN and EWOULDBLOCK from sendTo #279

Merged
merged 1 commit into from
Mar 18, 2020
Merged

Conversation

chehefen
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-io
Copy link

codecov-io commented Mar 18, 2020

Codecov Report

Merging #279 into master will decrease coverage by 0.19%.
The diff coverage is 20%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #279     +/-   ##
=========================================
- Coverage   87.06%   86.87%   -0.2%     
=========================================
  Files          33       33             
  Lines        7964     7978     +14     
=========================================
- Hits         6934     6931      -3     
- Misses       1030     1047     +17
Impacted Files Coverage Δ
src/source/Ice/SocketConnection.c 75.7% <20%> (-5.28%) ⬇️
src/source/Rtp/RtpPacket.c 72.1% <0%> (-1.58%) ⬇️
src/source/PeerConnection/PeerConnection.c 93.81% <0%> (-0.62%) ⬇️
src/source/Ice/IceAgent.c 93.91% <0%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c74b722...63d94a2. Read the comment docs.

src/source/Ice/SocketConnection.c Show resolved Hide resolved
src/source/Ice/SocketConnection.c Show resolved Hide resolved
if (result > 0) {
result = sendto(pSocketConnection->localSocket, pBuf, bufLen, 0, destAddr, addrLen);
} else if (result == 0) {
DLOGD("select() timed out");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these WARNS? I see you have DLOGD here but in the else below you have DLOGE. See whether this is indeed an DLOGE or DLOGW.

Also, in case of DLOGE you could use CHK_ERR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all these should be DLOGD cuz higher layer should to agnostic to send failures.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I thought. In that case, please make the other DLOGD

@chehefen chehefen force-pushed the handle-non-blocking-send branch from 919d09a to 63d94a2 Compare March 18, 2020 20:34
Copy link
Contributor

@MushMal MushMal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The comments prior to this were minor

@chehefen chehefen merged commit d161338 into master Mar 18, 2020
@chehefen chehefen deleted the handle-non-blocking-send branch March 18, 2020 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants