зеркало из https://github.com/mozilla/neqo.git
Use try_send, so the caller can handle the IO error (#2237)
* Use try_send, so the caller can handle the IO error * Use try_send in test
This commit is contained in:
Родитель
77b2635667
Коммит
c6b518c3e2
|
@ -35,7 +35,7 @@ pub fn send_inner(
|
|||
src_ip: None,
|
||||
};
|
||||
|
||||
state.send(socket, &transmit)?;
|
||||
state.try_send(socket, &transmit)?;
|
||||
|
||||
qtrace!(
|
||||
"sent {} bytes from {} to {}",
|
||||
|
@ -256,7 +256,7 @@ mod tests {
|
|||
segment_size: Some(SEGMENT_SIZE),
|
||||
src_ip: None,
|
||||
};
|
||||
sender.state.send((&sender.inner).into(), &transmit)?;
|
||||
sender.state.try_send((&sender.inner).into(), &transmit)?;
|
||||
|
||||
// Allow for one GSO sendmmsg to result in multiple GRO recvmmsg.
|
||||
let mut num_received = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче