We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3f4efef commit c77ae27Copy full SHA for c77ae27
1 file changed
src/base/Executor.ts
@@ -221,12 +221,16 @@ export class Peer {
221
* @returns A client instance or `undefined` if not able to connect
222
*/
223
public connect(): boolean {
224
+ // Check if already connected
225
+ if (this.interface !== undefined) return true
226
+
227
// If the executor is in-process, just use it directly
228
// eslint-disable-next-line @typescript-eslint/no-use-before-define
229
if (this.manifest.executor instanceof Executor) {
230
this.interface = this.manifest.executor
231
return true
232
}
233
234
// Connect to remote executor in order of preference of
235
// transports
236
for (const ClientType of this.clientTypes) {
0 commit comments