mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 01:20:13 +02:00
immediately error in AssetClient if no active socket for AS
This commit is contained in:
parent
ca94fbc219
commit
3c70a25a40
2 changed files with 11 additions and 7 deletions
|
@ -453,15 +453,17 @@ MessageID AssetClient::getAssetMapping(const AssetPath& path, MappingOperationCa
|
|||
|
||||
packetList->writeString(path);
|
||||
|
||||
nodeList->sendPacketList(std::move(packetList), *assetServer);
|
||||
if (nodeList->sendPacketList(std::move(packetList), *assetServer)) {
|
||||
_pendingMappingRequests[assetServer][messageID] = callback;
|
||||
|
||||
_pendingMappingRequests[assetServer][messageID] = callback;
|
||||
|
||||
return messageID;
|
||||
} else {
|
||||
callback(false, AssetServerError::NoError, QSharedPointer<ReceivedMessage>());
|
||||
return INVALID_MESSAGE_ID;
|
||||
return messageID;
|
||||
} else {
|
||||
qDebug() << "getAssetMapping would have been sent but no active socket - send back no response received";
|
||||
}
|
||||
}
|
||||
|
||||
callback(false, AssetServerError::NoError, QSharedPointer<ReceivedMessage>());
|
||||
return INVALID_MESSAGE_ID;
|
||||
}
|
||||
|
||||
MessageID AssetClient::getAllAssetMappings(MappingOperationCallback callback) {
|
||||
|
|
|
@ -65,6 +65,8 @@ void GetMappingRequest::doStart() {
|
|||
|
||||
auto assetClient = DependencyManager::get<AssetClient>();
|
||||
|
||||
qDebug() << "Asking asset client to get mapping for" << _path;
|
||||
|
||||
_mappingRequestID = assetClient->getAssetMapping(_path,
|
||||
[this, assetClient](bool responseReceived, AssetServerError error, QSharedPointer<ReceivedMessage> message) {
|
||||
|
||||
|
|
Loading…
Reference in a new issue