diff --git a/entry/src/main/ets/ssh/Channel.ts b/entry/src/main/ets/ssh/Channel.ts index c8e9ef8..65f28b0 100644 --- a/entry/src/main/ets/ssh/Channel.ts +++ b/entry/src/main/ets/ssh/Channel.ts @@ -84,6 +84,12 @@ export class SshChannel { } }, timeoutMs); }); + // If sendPacket below throws first, the timer above would later reject + // a promise nobody awaits; mark it handled (await below still throws). + opened.catch((e: Object): void => { + const err = e as Error; + Log.debug(SshChannel.TAG, `open wait aborted: ${err.message}`); + }); await this.transport.sendPacket(w.toBytes()); await opened; }