-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaScript connection cleanup #3083
Conversation
@@ -122,7 +121,7 @@ export class ConnectionI { | |||
this._initialized = false; | |||
this._validated = false; | |||
|
|||
this._asyncRequests = new HashMap(); // Map<int, OutgoingAsync> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only need to use HashMap when we need to use a custom key comparer. Here we can use the standard JavaScript Map.
@@ -1212,13 +1177,10 @@ export class ConnectionI { | |||
// Otherwise, prepare the next message stream for writing. | |||
// | |||
message = this._sendStreams[0]; | |||
Debug.assert(!message.prepared); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed message.prepared
which was only read by the asserts. Will fix in other mappings too.
@@ -1573,7 +1514,6 @@ class OutgoingMessage { | |||
static createForStream(stream) { | |||
const m = new OutgoingMessage(); | |||
m.stream = stream; | |||
m.isSent = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isSent was never reader in JavaScript.
No description provided.