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

WebSocket setTimeout wrap when on iOS #134

Merged
merged 3 commits into from
Jan 19, 2013
Merged

Conversation

xixixao
Copy link
Contributor

@xixixao xixixao commented Jan 19, 2013

Implementation from socketio/socket.io-client#426

// setTimeout, when they resume from sleeping the browser will crash if
// we don't allow the browser time to detect the socket has been closed
isIOS = (isIOS !== undefined) ? isIOS : 'undefined' != typeof navigator
&& /iPad|iPhone|iPod/i.test(navigator.userAgent)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's cache this outside where you defined isIOS directly, no point in checking for whether it's undefined.

@rauchg rauchg closed this Jan 19, 2013
rauchg added a commit that referenced this pull request Jan 19, 2013
WebSocket setTimeout wrap when on iOS
@rauchg rauchg merged commit 1c68636 into socketio:master Jan 19, 2013
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

Successfully merging this pull request may close these issues.

2 participants