mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Split PayloadTransferUpdate for incoming and outgoing sessions.
PiperOrigin-RevId: 657257085
This commit is contained in:
committed by
Copybara-Service
parent
861ed1b64b
commit
cd9ce0d924
@@ -131,6 +131,14 @@ bool ShareSession::OnConnected(const NearbySharingDecoder& decoder,
|
||||
return true;
|
||||
}
|
||||
|
||||
void ShareSession::Disconnect() {
|
||||
if (connection_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
// Do not clear connection_ here. It will be cleared in OnDisconnect().
|
||||
connection_->Close();
|
||||
}
|
||||
|
||||
void ShareSession::Abort(TransferMetadata::Status status) {
|
||||
NL_DCHECK(TransferMetadata::IsFinalStatus(status))
|
||||
<< "Abort should only be called with a final status";
|
||||
|
||||
Reference in New Issue
Block a user