-
Notifications
You must be signed in to change notification settings - Fork 24
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
RSDK-2268 - Update webrtc version #32
Conversation
@@ -72,6 +72,60 @@ impl RPCCredentials { | |||
} | |||
} | |||
|
|||
impl ViamChannel { | |||
async fn create_resp( |
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.
note to reviewers: this is big chunk of code but it's basically just factoring out some code into a helper function. Shouldn't need too much look.
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.
Fixes the integer overflow on my machine. Just a couple comments.
src/rpc/client_channel.rs
Outdated
pub(crate) fn new_stream(&self) -> Result<Stream> { | ||
// 256 is an arbitrarily high number for maximum concurrent streams, determined based on | ||
// analogous value in goutils | ||
if self.streams.len() >= 256 { |
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.
[nit] parameterize 256.
src/rpc/dial.rs
Outdated
Err(e) => { | ||
log::error!("{e}"); | ||
let response = response | ||
.header("grpc-status", &STATUS_CODE_UNKNOWN.to_string()) |
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.
[opt] a more informative error code would be RESOURCE_EXHAUSTED. Returning that here would assume that new_stream
never returns any other kind of error, though.
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.
ooh yeah thanks for the reminder on that one! fixed :)
}; | ||
match channel.new_stream() { | ||
Err(e) => { | ||
log::error!("{e}"); |
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.
log::error!("{e}"); | |
log::error!("error getting new stream: {e}"); |
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.
I opted for just printing the error here because I think the error message from new_stream()
is already pretty descriptive, so adding the prefix there just makes it feel wordy. Happy to chat more if you disagree :)
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.
No need! Makes sense to me.
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.
Thanks 🧑🔧 !
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.
LGTM
Updates us to webrtc v0.7.1, creates a blocking
close
fn for WebRTCBaseChannel to facilitate the upgrade.