Merge branch 'develop'

This commit is contained in:
Alice Gaudon 2020-07-30 11:59:50 +02:00
commit f1cc4d0abe
2 changed files with 18 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "aldap", "name": "aldap",
"version": "1.1.0", "version": "1.1.1",
"description": "Authentication LDAP server", "description": "Authentication LDAP server",
"repository": "git@gitlab.com:ArisuOngaku/aldap.git", "repository": "git@gitlab.com:ArisuOngaku/aldap.git",
"author": "Alice Gaudon <alice@gaudon.pro>", "author": "Alice Gaudon <alice@gaudon.pro>",

View File

@ -57,5 +57,22 @@ export default class LDAPServerComponent extends ApplicationComponent<void> {
this.server.listen(8389, '127.0.0.1', () => { this.server.listen(8389, '127.0.0.1', () => {
Logger.info(`LDAP server listening on ${this.server!.url}`); Logger.info(`LDAP server listening on ${this.server!.url}`);
}); });
this.server.on('close', () => {
Logger.info('LDAP server closed.');
});
}
public async stop(): Promise<void> {
await new Promise(resolve => {
if (this.server) {
// @ts-ignore
this.server.close(() => {
resolve();
});
} else {
resolve();
}
});
} }
} }