Skip to content

Commit

Permalink
fix logic errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus-Rost committed Jul 24, 2024
1 parent 0136784 commit 1e9a8b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ const server = createServer( (req, res) => {
let site = reqURL.searchParams.get('site');
console.log( '- Dashboard: Requesting RcGcDb debug dump' + ( site ? ' for ' + site : '.' ) );
return new Promise( (resolve, reject) => {
let id = Date.now();
let id = Date.now().toString();
if ( site ) id = '-1+' + id;
let timeout = setTimeout( () => {
listenerMap.delete(id);
Expand All @@ -314,6 +314,7 @@ const server = createServer( (req, res) => {
/** @param {String} body */
function write(body) {
return res.write( body, error => {
if ( !error ) return;
listenerMap.delete(id);
clearTimeout(timeout);
reject(error);
Expand Down

0 comments on commit 1e9a8b2

Please sign in to comment.