Skip to content
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

Merged
merged 1 commit into from
Nov 6, 2024
Merged

Conversation

pepone
Copy link
Member

@pepone pepone commented Nov 6, 2024

No description provided.

@@ -122,7 +121,7 @@ export class ConnectionI {
this._initialized = false;
this._validated = false;

this._asyncRequests = new HashMap(); // Map<int, OutgoingAsync>
Copy link
Member Author

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);
Copy link
Member Author

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;
Copy link
Member Author

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.

@pepone pepone merged commit 2733f64 into zeroc-ice:main Nov 6, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants