mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-06 22:22:38 +03:00
Change onReadData() to return an error
Summary: All according to plan: https://fburl.com/gdoc/pebccgi1 Changing function definitions to return errors while still throwing. Reviewed By: sharmafb Differential Revision: D69567329 fbshipit-source-id: 5d40ee32fe185d5674785632a9a13e4cef996988
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6a8f9bcb6b
commit
d98c90c48d
@@ -283,10 +283,11 @@ class TestQuicTransport
|
||||
return lossTimeout_.getTimerCallbackTimeRemaining();
|
||||
}
|
||||
|
||||
void onReadData(const folly::SocketAddress&, ReceivedUdpPacket&& udpPacket)
|
||||
override {
|
||||
folly::Expected<folly::Unit, QuicError> onReadData(
|
||||
const folly::SocketAddress&,
|
||||
ReceivedUdpPacket&& udpPacket) override {
|
||||
if (udpPacket.buf.empty()) {
|
||||
return;
|
||||
return folly::unit;
|
||||
}
|
||||
folly::io::Cursor cursor(udpPacket.buf.front());
|
||||
while (!cursor.isAtEnd()) {
|
||||
@@ -332,6 +333,7 @@ class TestQuicTransport
|
||||
conn_->streamManager->updatePeekableStreams(*stream);
|
||||
}
|
||||
}
|
||||
return folly::unit;
|
||||
}
|
||||
|
||||
void writeData() override {
|
||||
|
Reference in New Issue
Block a user