Fixed issue 40296: RemoteCallManager response not handled when timemout is fired.
authorJavier Armendáriz <javier.armendariz@openbravo.com>
Thu, 28 Feb 2019 10:53:54 +0100
changeset 35607 a343fa7f1564
parent 35327 c23ab3fedd95
child 35608 a6f6f363f490
Fixed issue 40296: RemoteCallManager response not handled when timemout is fired.

Removed result sanitizing in RPCManager. This makes timeout message appears but
also marks the request as complete and the actual response is not processed when
it arrives.
modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
--- a/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js	Wed Feb 27 12:32:40 2019 +0000
+++ b/modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js	Thu Feb 28 10:53:54 2019 +0100
@@ -813,21 +813,12 @@
 
   _originalEvalResult: isc.RPCManager.evalResult,
   evalResult: function (request, response, results) {
-    if (response.status !== isc.RPCResponse.STATUS_SUCCESS) {
-      if (isc.isA.Function(request.errorCallback)) {
-        // if the response contains an error status, call the errorCallback
-        request.errorCallback(request, response);
-      } else {
-        // try to handle the error in the standard way
-        this.handleError(response, request);
-      }
+    if (response.status !== isc.RPCResponse.STATUS_SUCCESS && isc.isA.Function(request.errorCallback)) {
+      // if the response contains an error status, call the errorCallback
+      request.errorCallback(request, response);
     }
 
-    return this._originalEvalResult(request, response, this.sanitizeResults(results));
-  },
-
-  sanitizeResults: function (results) {
-    return isc.isA.Object(results) ? JSON.stringify(results) : results;
+    return this._originalEvalResult(request, response, results);
   },
 
   // Escape characters that are not properly handled in JavaScript's eval. See issue #36788.