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

timeout is not working #439

Closed
cnliusen opened this issue Dec 11, 2017 · 1 comment
Closed

timeout is not working #439

cnliusen opened this issue Dec 11, 2017 · 1 comment

Comments

@cnliusen
Copy link
Contributor

cnliusen commented Dec 11, 2017

I set the connection timeout using the following code. The timeout seems have not effect.

var request = URLRequest(url: url)
        request.timeoutInterval = 5

I looked at the library code and found this part. It seems the stream is not actually disconnected.

stream.connect(url: url, port: port, timeout: timeout, ssl: settings, completion: { [weak self] (error) in
            guard let s = self else {return}
            if error != nil {
                //do disconnect
                return
            }
          ...
@daltoniam
Copy link
Owner

Great catch! This has been fixed in 3.0.4! Thanks!

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

2 participants