Skip to content

Commit

Permalink
[lib/asset]Check connection-status before trying to aSyncRead.
Browse files Browse the repository at this point in the history
  • Loading branch information
rawler committed Mar 1, 2012
1 parent 68fe525 commit b14ebff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/asset.cpp
Expand Up @@ -75,7 +75,7 @@ void ReadAsset::handleMessage(const bithorde::Read::Response &msg) {

int ReadAsset::aSyncRead(uint64_t offset, ssize_t size)
{
if (!_client)
if (!_client || !_client->isConnected())
return -1;
int reqId = _client->allocRPCRequest(_handle);
int64_t maxSize = _size - offset;
Expand Down

0 comments on commit b14ebff

Please sign in to comment.