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

Return error when can't get conn to send ACK #22

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

billfort
Copy link
Contributor

When the reader gets packets and needs to send ACK back to the writer, if can't find the right connection, throw ConnNotFoundError.

@yilunzhang
Copy link
Member

Always run yarn build before commit

src/session.js Outdated
@@ -219,6 +219,8 @@ export default class Session {
let conn = this.connections.get(util.connKey(localClientID, remoteClientID));
if (conn) {
conn.sendAck(packet.getSequenceId());
} else {
throw new errors.ConnNotFoundError(util.connKey(localClientID, remoteClientID));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error message here contains only connKey. It's better to be more verbose, like Conn xxx not found

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, modified.

@yilunzhang
Copy link
Member

You forgot yarn build again...

Signed-off-by: bill fort <fxbao@hotmail.com>
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.

2 participants