Skip to content

GitLab

  • Menu
Projects Groups 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
    • Contributors
    • Graph
    • Compare
  • 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
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • 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-itasks
  • clean-libraries
  • Merge requests
  • !4

Merged
Created Oct 03, 2019 by Mart Lubbers@mlubbersOwner

fix timeout by checking the socket for errors

  • Overview 0
  • Commits 1
  • 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
Reviewer
Request review from
Time tracking
Source branch: fix-timout-linux