Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C clean-libraries
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • clean-and-itasksclean-and-itasks
  • clean-libraries
  • Merge requests
  • !4

fix timeout by checking the socket for errors

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Mart Lubbers requested to merge fix-timout-linux into master Oct 03, 2019
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1

In the old situation when the connect didn't immediately return, the socket was placed in a select. An error was throws only when the socket was in the exceptset. However, sockets are only in the exceptset in very particular cases (see man select). Unable to connect is not one of those cases.

Therefore to actually check if a connection was refused, the error status must be checked with getsockopt.

Also see (https://stackoverflow.com/questions/2597608/c-socket-connection-timeout/2597774#2597774)

Closes: clean-and-itasks/iTasks-SDK#348

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix-timout-linux