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

Fix panic in conn open try when no connection id is provided #615

Merged
merged 1 commit into from
Feb 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions modules/src/ics03_connection/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ pub trait ConnectionKeeper {
)?;
}
State::TryOpen => {
self.store_connection(
&result.connection_id.clone().unwrap(),
&result.connection_end,
)?;
let connection_id = result
.connection_id
.unwrap_or_else(|| self.next_connection_id());
self.store_connection(&connection_id, &result.connection_end)?;
// If this is the first time the handler processed this connection, associate the
// connection end to its client identifier.
self.store_connection_to_client(
&result.connection_id.clone().unwrap(),
&connection_id,
&result.connection_end.client_id(),
)?;
}
Expand Down