Commit 68473d31ef426d44f700e0b079af374482c15230

Authored by Adhidarma Hadiwinoto
1 parent ab524b7ebe
Exists in master

penanganan ETIMEDOUT

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

... ... @@ -114,6 +114,9 @@ function _topupRequest(task, pendingOnConnectError) {
114 114 if (!pendingOnConnectError && (error.code == 'ECONNREFUSED' || error.code == 'EHOSTUNREACH')) {
115 115 rc = '91';
116 116 msg = 'XMLRPC Client Error on connecting';
  117 + } else if (!pendingOnConnectError && error.code == 'ETIMEDOUT' && error.syscall == "connect") {
  118 + rc = '91';
  119 + msg = 'XMLRPC Client Error on connecting';
117 120 }
118 121  
119 122 callbackReport(task['requestId'], rc, msg, null, JSON.stringify({methodName: methodName, error: error, body: error.body}));