Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-127579

QNativeSocketEngine on *nix lacks errno handling

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.8.0 Beta2
    • Network, Network: Sockets
    • None
    • Android, iOS/tvOS/watchOS, Linux/Wayland, Linux/X11, Linux/Yocto, Linux/Other display system, macOS

      qnativesocketengine_unix.cpp:441

      (which is related to Fix -Wimplicit-fallthrough for clang (544053) )

      case EAFNOSUPPORT:
      case EBADF:
      case EFAULT:
      case ENOTSOCK:
          socketState = QAbstractSocket::UnconnectedState;
          break;
      default:
          break; //! break without handling it
      

      If the control flow breaks there, the socket will keep in ConnectingState and try reconnecting again, which may be problematic.

      In some cases which the socket failed to connect immediately (probably blocked by firewall or sth.), reconnecting will quickly drain full CPU load.

      AFAIK, when using Little Snitch on macos to block network connection, connect() will fail with EOPNOTSUPP.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            manordheim Mårten Nordheim
            creepercdn 呱呱 咕
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes