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

Error code: -9968(0x26f0), Operation now in progress #91

Open
Oliver-Binns opened this issue Oct 3, 2018 · 2 comments
Open

Error code: -9968(0x26f0), Operation now in progress #91

Oliver-Binns opened this issue Oct 3, 2018 · 2 comments

Comments

@Oliver-Binns
Copy link

I am trying to send mail through Zoho Mail using Swift-SMTP as part of a Vapor app on a Linux server.
I am sending the mail in the background thread once triggered using a HTTP request.

DispatchQueue.global().async {
    smtp.send(email){
        if let error = error{
            print(error)
        }
    }
}

The console prints out an annoyingly unhelpful "Error code: -9968(0x26f0), Operation now in progress". Please can you help me to decipher the meaning of this?

@djones6
Copy link
Contributor

djones6 commented Nov 9, 2018

@Oliver-Binns I'm not sure, but my guess is that the connection to the SMTP server is timing out, and this is resulting in a confusing error message.

The error -9968 is defined in BlueSocket as SOCKET_ERR_CONNECT_TIMEOUT here:
https://github.com/IBM-Swift/BlueSocket/blob/1.0.24/Sources/Socket/Socket.swift#L1837

It is reported along with the 'last error' returned for the socket, which appears to be EINPROGRESS, though I'm not sure why that error would be returned. https://stackoverflow.com/questions/15243988/connect-returns-operation-now-in-progress-on-blocking-socket seems like it might be relevant. I don't know whether @billabt might have some ideas?

@anxhela-coder
Copy link

@Oliver-Binns I got the same error when I was running the app in simulator. Try to run it in a real device.

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

3 participants