Skip to content
Snippets Groups Projects
Commit a7976ce2 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

Merge branch 'fix/ivette/always-poll' into 'master'

Fix/ivette/always poll

See merge request frama-c/frama-c!3360
parents 3a8761a9 079c1053
No related branches found
No related tags found
No related merge requests found
......@@ -847,25 +847,24 @@ async function _send() {
// when busy, will be eventually re-triggered
if (!zmqIsBusy) {
const cmds = queueCmd;
if (!cmds.length && _waiting()) cmds.push('POLL');
if (cmds.length) {
zmqIsBusy = true;
const ids = queueId;
queueCmd = [];
queueId = [];
try {
await zmqSocket?.send(cmds);
const resp = await zmqSocket?.receive();
_receive(resp);
} catch (error) {
D.error(`Error in send/receive on ZMQ socket. ${error.toString()}`);
_cancel(ids);
}
zmqIsBusy = false;
} else {
// No pending command nor pending response
rqCount = 0;
if (!cmds.length) {
cmds.push('POLL');
if (!_waiting())
rqCount = 0; // No pending command nor pending response
}
zmqIsBusy = true;
const ids = queueId;
queueCmd = [];
queueId = [];
try {
await zmqSocket?.send(cmds);
const resp = await zmqSocket?.receive();
_receive(resp);
} catch (error) {
D.error(`Error in send/receive on ZMQ socket. ${error.toString()}`);
_cancel(ids);
}
zmqIsBusy = false;
STATUS.emit(status);
}
}
......
......@@ -209,7 +209,7 @@ let kill_exec e = e.killed <- true
let kill_request eq id e = if eq id e.id then e.killed <- true
let process_request (server : 'a server) (request : 'a request) : unit =
if Senv.debug_atleast 1 then
if Senv.debug_atleast 1 && (Senv.debug_atleast 3 || request <> `Poll) then
Senv.debug "%a" (pp_request server.pretty) request ;
match request with
| `Poll -> ()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment