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

Socket HAL bugfix (virtual device) #1134

merged 2 commits into from Oct 17, 2016


Copy link

commented Oct 5, 2016

This PR fixes seemingly random cloud connection errors on virtual device, caused by incorrect error handling in socket_receive(): socket hal uses global ec variable for exceptionless error handling, and previously any error on unrelated socket (such as socket used for multicast announcement) might affect cloud connection.


  • Contributor has signed CLA
  • Problem and Solution clearly stated
  • Code peer reviewed
  • API tests compiled
  • Run unit/integration/application tests on device
  • Add documentation (N/A)
  • Add to after merging (add links to docs and issues)


  • [GCC Virtual Device] Error in socket_hal's socket_receive() logic caused random cloud connection errors. PR #1134

@sergeuz sergeuz added this to the 0.7.x milestone Oct 5, 2016

@sergeuz sergeuz changed the title Fixed error handling Socket HAL bugfix (virtual device) Oct 5, 2016

@monkbroc monkbroc self-assigned this Oct 11, 2016

Copy link

left a comment

I see the { added to the if statement, but I'm not sure how that relates to the ec global variable. Is it because without the { the previous value of ec is checked even when the if condition is false, leading to false errors?


This comment has been minimized.

Copy link
Member Author

commented Oct 11, 2016

Yes, exactly


This comment has been minimized.

Copy link

commented Oct 11, 2016

Must have { on all ifs!

@monkbroc monkbroc removed their assignment Oct 14, 2016

@technobly technobly merged commit 801772e into develop Oct 17, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@technobly technobly deleted the fix/gcc_socket_hal branch Oct 17, 2016

@technobly technobly modified the milestones: 0.7.x, 0.6.1 Nov 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.