mirror of
https://github.com/coder/code-server.git
synced 2026-05-28 07:59:34 +00:00
Prevent exiting when an exception is uncaught
This commit is contained in:
@@ -24,11 +24,11 @@ export class SshProvider extends HttpProvider {
|
||||
})
|
||||
}
|
||||
|
||||
public async listen(): Promise<string> {
|
||||
public async listen(): Promise<number> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.sshServer.once("error", reject)
|
||||
this.sshServer.listen(() => {
|
||||
resolve(this.sshServer.address().port.toString())
|
||||
resolve(this.sshServer.address().port)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user