Skip to content

[FIX] Limit App’s HTTP calls to 500ms#13949

Merged
sampaiodiego merged 3 commits intodevelopfrom
engine-http-timeout
Apr 1, 2019
Merged

[FIX] Limit App’s HTTP calls to 500ms#13949
sampaiodiego merged 3 commits intodevelopfrom
engine-http-timeout

Conversation

@rodrigok
Copy link
Member

And fix a regression

@rodrigok rodrigok added this to the 1.0.0 milestone Mar 29, 2019
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-13949 March 29, 2019 15:51 Inactive

async call(info) {
if (typeof info.request.timeout !== 'number' || info.request.timeout > 500) {
info.request.timeout = 500;
Copy link
Member

@sampaiodiego sampaiodiego Mar 29, 2019

Choose a reason for hiding this comment

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

I'm not sure 500 is a good number. Wondering how many requests may start failing after adding this timeout.

also because of this I think we should tag as a break change.

Copy link
Member Author

Choose a reason for hiding this comment

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

The VM has a timeout of 1000ms, that's why 500ms.

I think it's more a fix than a break change, since the HTTP not respecting the VM's timeout wasn't expected.

Co-Authored-By: rodrigok <rodrigoknascimento@gmail.com>
@rodrigok rodrigok temporarily deployed to rocket-chat-pr-13949 March 29, 2019 16:57 Inactive
@graywolf336
Copy link
Contributor

What happens when this timeout is reached? Will it reject the promise of silently fail?

@rodrigok
Copy link
Member Author

@graywolf336 it will reject the promise and return the response as timeout

@graywolf336 graywolf336 requested a review from d-gubert April 1, 2019 14:31
@d-gubert
Copy link
Member

d-gubert commented Apr 1, 2019

I would say that it would be valuable to add some tests for this case.... but since we are so interested on merging this ASAP, I'll just say LGTM 🙈

@sampaiodiego sampaiodiego changed the title [NEW] Limit App’s HTTP calls to 500ms [FIX] Limit App’s HTTP calls to 500ms Apr 1, 2019
@sampaiodiego sampaiodiego merged commit cdf70b1 into develop Apr 1, 2019
@sampaiodiego sampaiodiego deleted the engine-http-timeout branch April 1, 2019 19:07
@rodrigok rodrigok mentioned this pull request Apr 28, 2019
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.

5 participants

Comments