2

I'm running the following thrift javascript client code. If the server is down, I don't get any error in the callback - just console log message.

How do I know if there're connection issues if the callback isn't invoked?

Javascript thrift client code:

var transport = new Thrift.Transport("/api/thrift/");
var protocol = new Thrift.Protocol(transport);
var client = new ApiClient(protocol);
client.doSomething(function (result) {
  // Never invoked if the server is down.
});

Console log message:

POST http://localhost:81/api/thrift/ net::ERR_CONNECTION_REFUSED
AlikElzin-kilaka
  • 34,335
  • 35
  • 194
  • 277

0 Answers0