Skip to content

Commit

Permalink
[keyserver] Fix stalling of keyserver public key script
Browse files Browse the repository at this point in the history
Summary: Should've noticed this in D8448. We initialize the MySQL connection but never close it, which is why the script stalls. This is addressed by using the `main` util (all scripts are supposed to use this).

Test Plan: Run script locally, confirm it no longer stalls

Reviewers: varun

Reviewed By: varun

Subscribers: tomek

Differential Revision: https://phab.comm.dev/D8449
  • Loading branch information
Ashoat committed Jul 10, 2023
1 parent 50e4497 commit 8d6a451
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions keyserver/src/scripts/get-keyserver-public-key.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// @flow

import { main } from './utils.js';
import { fetchOlmAccount } from '../updaters/olm-account-updater.js';

// Outputs the keyserver's signing ed25519 public key
async function main() {
async function getKeyserverPublicKey() {
const info = await fetchOlmAccount('content');
console.log(JSON.parse(info.account.identity_keys()).ed25519);
}

main();
main([getKeyserverPublicKey]);

0 comments on commit 8d6a451

Please sign in to comment.