[
https://issues.apache.org/jira/browse/THRIFT-3328?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15047448#comment-15047448
]
Hudson commented on THRIFT-3328:
--------------------------------
FAILURE: Integrated in Thrift #1761 (See
[https://builds.apache.org/job/Thrift/1761/])
THRIFT-3328 A callback is not called when a server is down. (roger: rev
84cf363eeedf4cc9bb618bb2b1980696b9f6fc9b)
* lib/js/src/thrift.js
> A callback is not called when a server is down.
> -----------------------------------------------
>
> Key: THRIFT-3328
> URL: https://issues.apache.org/jira/browse/THRIFT-3328
> Project: Thrift
> Issue Type: Bug
> Components: JavaScript - Library
> Reporter: HIRANO Satoshi
> Assignee: HIRANO Satoshi
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> When an async method is called in a JS client for a server which is down, the
> call should call a supplied callback.
> Actually the async call fails with the following error and the callback not
> called.
> OPTIONS http://xxxx net::ERR_CONNECTION_REFUSED
> Note that the above OPTIONS is because I use HTTP OPTIONS. Don't mind.
> Thrift.TXHRTransport.flush() has the following fragment.
> if (callback) {
> //Ignore XHR callbacks until the data arrives, then call the
> // client's callback
> xreq.onreadystatechange =
> (function() {
> var clientCallback = callback;
> return function() {
> if (this.readyState == 4 && this.status == 200) {
> self.setRecvBuffer(this.responseText);
> clientCallback();
> }
> };
> }());
> }
> I think the reason why the callback is not called is that "this.status ==
> 200" ignores fatal statuses and skips clientCallback().
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)