Permalink
Browse files

[lib/asset]Check connection-status before trying to aSyncRead.

  • Loading branch information...
1 parent 68fe525 commit b14ebff2ae570a271eac166b22208c0d976b1eca @rawler committed Mar 1, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/asset.cpp
View
@@ -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;

0 comments on commit b14ebff

Please sign in to comment.