libdrizzle fails to connect to uds

Bug #944428 reported by Eric Bergen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
New
Undecided
Unassigned

Bug Description

A successful connect() call when connecting to a unix domain socket results in an infinite loop of calls back to drizzle_state_connect(). In conn.cc I had to add a drizzle_state_pop(con) to get a successful uds connection. I'm not sure if this is the correct way to fix it but it seems to work.

    do {
      if (connect(con->fd, (struct sockaddr *)&servAddr, sizeof(servAddr)) < 0)
      {
        switch (errno)
        {
        case EINPROGRESS:
        case EALREADY:
        case EINTR:
          continue;

        case EISCONN: /* We were spinning waiting on connect */
          {
            break;
          }

        default:
          con->drizzle->last_errno= errno;
          return DRIZZLE_RETURN_COULD_NOT_CONNECT;
        }
      }
      //This else added by eric to get a successful connection
      else
      {
        drizzle_state_pop(con);
        break;
      }
    } while (0);

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.