Skip to content
Snippets Groups Projects
Commit 1eabf18b authored by Patrick Jentsch's avatar Patrick Jentsch
Browse files

Remove timeout in cqi js

parent 1cd9540e
Branches
Tags
No related merge requests found
...@@ -22,14 +22,15 @@ cqi.api.APIClient = class APIClient { ...@@ -22,14 +22,15 @@ cqi.api.APIClient = class APIClient {
/** /**
* @param {string} fn_name * @param {string} fn_name
* @param {object} [fn_args={}] * @param {object} [fn_args={}]
* @returns {Promise<cqi.status.StatusConnectOk>} * @returns {Promise}
*/ */
#request(fn_name, fn_args = {}) { #request(fn_name, fn_args = {}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.socket.timeout(this.timeout).emit('cqi', {fn_name: fn_name, fn_args: fn_args}, (timeoutError, response) => { // this.socket.timeout(this.timeout).emit('cqi', {fn_name: fn_name, fn_args: fn_args}, (timeoutError, response) => {
if (timeoutError) { // if (timeoutError) {
reject(timeoutError); // reject(timeoutError);
} // }
this.socket.emit('cqi', {fn_name: fn_name, fn_args: fn_args}, (response) => {
if (response.code === 200) { if (response.code === 200) {
resolve(response.payload); resolve(response.payload);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment