Catched SQLITE_BUSY exception.
This commit is contained in:
parent
7d15dbf4ed
commit
a71f8ed9a6
@ -13,6 +13,7 @@
|
||||
#include <gdfontmb.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <unistd.h>
|
||||
#include "config.h"
|
||||
#include "PlayerAttributes.h"
|
||||
#include "TileGenerator.h"
|
||||
@ -301,6 +302,9 @@ void TileGenerator::loadBlocks()
|
||||
}
|
||||
m_positions.push_back(std::pair<int, int>(pos.x, pos.z));
|
||||
}
|
||||
else if (result == SQLITE_BUSY) {
|
||||
usleep(10000);
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
@ -613,6 +617,9 @@ std::map<int, TileGenerator::BlockList> TileGenerator::getBlocksOnZ(int zPos, sq
|
||||
BlockPos pos = decodeBlockPos(blocknum);
|
||||
blocks[pos.x].push_back(Block(pos, unsigned_string(data, size)));
|
||||
}
|
||||
else if (result == SQLITE_BUSY) {
|
||||
usleep(10000);
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user