Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-199

Socket reads not checked for IO errors, e.g. timeouts

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.8.1
    • Affects Version/s: 0.7
    • Component/s: None
    • None

      mongo.c:315 in mongo_read_response

      mongo_env_read_socket( conn, &head, sizeof( head ) );
      mongo_env_read_socket( conn, &fields, sizeof( fields ) );

      These socket read ops are not checked for an error, e.g., timeout.

      The function ignores the error, will probably be out-of-sync, and will carry on with garbage. The read ops should be checked and appropriate action taken, probably closing the socket since message will be out-of-sync and the socket no longer useful.

            Assignee:
            gjmurakami Gary Murakami
            Reporter:
            gjmurakami Gary Murakami
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: