View | Details | Raw Unified
Collapse All | Expand All

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