-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: credo ws patch and agent restart (#2355)
Signed-off-by: Bryce McMath <bryce.j.mcmath@gmail.com>
- Loading branch information
1 parent
966e301
commit f376450
Showing
7 changed files
with
178 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
diff --git a/build/transport/WsOutboundTransport.js b/build/transport/WsOutboundTransport.js | ||
index ab9df20f9fedc4def4f486b9431ac669e899e609..220157c6082b6c9761e021e611e66510dd9a05fd 100644 | ||
--- a/build/transport/WsOutboundTransport.js | ||
+++ b/build/transport/WsOutboundTransport.js | ||
@@ -43,7 +43,16 @@ class WsOutboundTransport { | ||
this.transportTable.forEach((socket) => { | ||
socket.removeEventListener('message', this.handleMessageEvent); | ||
if (socket.readyState !== this.WebSocketClass.CLOSED) { | ||
- stillOpenSocketClosingPromises.push(new Promise((resolve) => socket.once('close', resolve))); | ||
+ stillOpenSocketClosingPromises.push( | ||
+ new Promise((resolve) => { | ||
+ const closeHandler = () => { | ||
+ socket.removeEventListener('close', closeHandler) | ||
+ resolve() | ||
+ } | ||
+ | ||
+ socket.addEventListener('close', closeHandler) | ||
+ }) | ||
+ ); | ||
socket.close(); | ||
} | ||
}); |
13 changes: 13 additions & 0 deletions
13
.yarn/patches/@credo-ts-indy-vdr-npm-0.5.11-ced84362c9.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/build/pool/IndyVdrPool.js b/build/pool/IndyVdrPool.js | ||
index eab13b315dede8a2a7f7f56caa850405cf5f2f47..2109fb8eeae12c490b8233403b4445a5f6e0e465 100644 | ||
--- a/build/pool/IndyVdrPool.js | ||
+++ b/build/pool/IndyVdrPool.js | ||
@@ -17,7 +17,7 @@ class IndyVdrPool { | ||
} | ||
connect() { | ||
if (this._pool) { | ||
- throw new error_1.IndyVdrError('Cannot connect to pool, already connected.'); | ||
+ return; | ||
} | ||
this._pool = new indy_vdr_shared_1.PoolCreate({ | ||
parameters: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters