Skip to content

Commit

Permalink
🤕: properly await close call in case open() fails
Browse files Browse the repository at this point in the history
  • Loading branch information
merryman committed Dec 16, 2024
1 parent bb25019 commit c80c9cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lively.headless/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class HeadlessSession {
return this;
} catch (err) {
console.error(`[lively.headless] ${err.stack}`);
try { this.close(); } catch (err) {}
try { await this.close(); } catch (err) {}
this.state = SESSION_STATE.ERRORED;
this.error = String(err.stack);
throw err;
Expand Down

0 comments on commit c80c9cc

Please sign in to comment.