Skip to content

Commit 090385f

Browse files
committed
fix: Make host and port available during connecting step.
Signed-off-by: Paolo Insogna <[email protected]>
1 parent 9f146aa commit 090385f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/network/connection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,11 @@ export class Connection extends EventEmitter {
143143
}
144144

145145
get host (): string | undefined {
146-
return this.#status === ConnectionStatuses.CONNECTED ? this.#host : undefined
146+
return this.#status === ConnectionStatuses.CONNECTING || ConnectionStatuses.CONNECTED ? this.#host : undefined
147147
}
148148

149149
get port (): number | undefined {
150-
return this.#status === ConnectionStatuses.CONNECTED ? this.#port : undefined
150+
return this.#status === ConnectionStatuses.CONNECTING || ConnectionStatuses.CONNECTED ? this.#port : undefined
151151
}
152152

153153
get instanceId (): number {

0 commit comments

Comments
 (0)