Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSAEWOULDBLOCK support issue in SChannelSocketRequest #4

Open
EricGrange opened this issue Nov 7, 2023 · 0 comments
Open

WSAEWOULDBLOCK support issue in SChannelSocketRequest #4

EricGrange opened this issue Nov 7, 2023 · 0 comments

Comments

@EricGrange
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant