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

TCPServer::accept() hardfaults if maximum number of sockets open #2523

Closed
tommikas opened this issue Aug 23, 2016 · 7 comments
Closed

TCPServer::accept() hardfaults if maximum number of sockets open #2523

tommikas opened this issue Aug 23, 2016 · 7 comments

Comments

@tommikas
Copy link
Contributor

  1. Open 4 sockets, at least one of which is a TCPServer type socket
  2. bind the server socket and set it to listen
  3. call accept() on the TCPServer socket
@sg-
Copy link
Contributor

sg- commented Aug 23, 2016

Can you provide a code snippet? This will help increase the time it takes reproduce and fix.

@tommikas
Copy link
Contributor Author

I would hope it'd have the opposite effect ;)

Anyway, I hacked mbed-os-example-blinky a bit: https://gist.github.com/tommikas/870cc1a7f50bbf0643d7bc47e6cf5392
(The same result could be achieved by the example in the issue that referenced this one.)

@ciarmcom
Copy link
Member

ARM Internal Ref: IOTMORF-427

@geky
Copy link
Contributor

geky commented Aug 25, 2016

Thanks for reporting this, that is an interesting corner case but should be easy to fail gracefully (returning NSAPI_ERROR_NO_SOCKETS)

@tommikas
Copy link
Contributor Author

That sounds like a more reasonable way to handle it.

@geky
Copy link
Contributor

geky commented Aug 29, 2016

#2579 should resolve this problem as suggested. Let us know if there is still an issue.

@tommikas
Copy link
Contributor Author

This has been fixed. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants