[FIX] hw_screen: Add delay to longpolling
When an error occurred in the longpolling, we used to resend a new request immediately. This resulted in thousands of request in a few seconds when we lost connection to the box. closes odoo/odoo#32544 Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This commit is contained in:
@@ -47,14 +47,17 @@
|
||||
foreign_js();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
complete: function(jqXHR,err) {
|
||||
if (!stop_longpolling) {
|
||||
longpolling();
|
||||
}
|
||||
},
|
||||
|
||||
error: function (jqXHR, status, err) {
|
||||
if (!stop_longpolling) {
|
||||
setTimeout(longpolling, 5000);
|
||||
}
|
||||
},
|
||||
|
||||
timeout: 30000,
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user