Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 145884 | Differences between
and this patch

Collapse All | Expand All

(-)src/unix/gsocket.cpp (-5 / +4 lines)
Lines 1168-1184 Link Here
1168
    else
1168
    else
1169
      ret = Recv_Dgram(buffer, size);
1169
      ret = Recv_Dgram(buffer, size);
1170
1170
1171
    /* If recv returned zero, then the connection is lost, and errno is not set.
1171
    /* If recv returned zero, then the connection has been gracefully closed.
1172
     * Otherwise, recv has returned an error (-1), in which case we have lost the
1172
     * Otherwise, recv has returned an error (-1), in which case we have lost the
1173
     * socket only if errno does _not_ indicate that there may be more data to read.
1173
     * socket only if errno does _not_ indicate that there may be more data to read.
1174
     */
1174
     */
1175
    if (ret == 0)
1175
    if (ret == 0)
1176
    {
1176
    {
1177
      m_error = GSOCK_IOERR;
1177
      /* Make sure wxSOCKET_LOST event gets sent */
1178
      m_detected = GSOCK_LOST_FLAG;
1178
      m_detected = GSOCK_LOST_FLAG;
1179
      Close();
1179
      Detected_Read();
1180
      // Signal an error for return
1180
      return 0;
1181
      return -1;
1182
    }
1181
    }
1183
    else if (ret == -1)
1182
    else if (ret == -1)
1184
    {
1183
    {

Return to bug 145884