Skip to content

WSAEWOULDBLOCK support issue in SChannelSocketRequest #4

Open
@EricGrange

Description

@EricGrange

The code tests if res < 0 so the res = 0 will always fail, and WSAEWOULDBLOCK sleep never happens

      // get the data
      res := socket.Recv((PByte(IoBuffer) + cbData), cbIoBufferLength - cbData);
      if res < 0 then
      begin
        if (res = 0) and (WSAGetLastError = WSAEWOULDBLOCK) then
        begin
          Sleep(100);
          Continue;
        end;
        raise ESSPIError.CreateWinAPI('reading data from server', 'recv', res);
      end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions