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

Fixed HTTP connection timeout on Android #22164

Closed
wants to merge 2 commits into from

Conversation

codebutler
Copy link

@codebutler codebutler commented Nov 6, 2018

Fixes #11666 (Which was incorrectly closed)

Test Plan:

const xhr = new XMLHttpRequest();
xhr.timeout = 10000;

xhr.addEventListener('timeout', (evnt: any) => {
  // Never fires without this fix.
  alert('timeout!!');
});

// Set to any non-existent IP
xhr.open('GET', 'http://10.0.0.99:123/', true);
xhr.send('');

Release Notes:

[Android] [Fixed] Fixed HTTP Connection Timeout

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 6, 2018
@pull-bot
Copy link

pull-bot commented Nov 6, 2018

Warnings
⚠️

📋 Release Notes - This PR may have incorrectly formatted Release Notes.

Generated by 🚫 dangerJS

@react-native-bot react-native-bot added 🌐Networking Related to a networking API. Platform: Android Android applications. labels Nov 6, 2018
Copy link
Contributor

@dulmandakh dulmandakh left a comment

Choose a reason for hiding this comment

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

remove all timeouts but clientBuilder.connectTimeout(timeout, TimeUnit.MILLISECONDS);

it'll be enough for fix.

@dulmandakh
Copy link
Contributor

@facebook-github-bot shipit

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Nov 14, 2018
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

@dulmandakh is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

Eric Butler merged commit a508134 into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Nov 14, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 14, 2018
kelset pushed a commit that referenced this pull request Nov 26, 2018
Summary:
Fixes #11666 (Which was incorrectly closed)
Pull Request resolved: #22164

Differential Revision: D13057001

Pulled By: hramos

fbshipit-source-id: bcd53e893bc7c114f866e54938166b74b8ae0299
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
Summary:
Fixes facebook#11666 (Which was incorrectly closed)
Pull Request resolved: facebook#22164

Differential Revision: D13057001

Pulled By: hramos

fbshipit-source-id: bcd53e893bc7c114f866e54938166b74b8ae0299
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. 🌐Networking Related to a networking API. Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Android] - XMLHttpRequest ontimeout not fired
6 participants