Skip to content

Commit

Permalink
Perform a NOP if SENDING is empty to prevent "no packets sent" errors
Browse files Browse the repository at this point in the history
  • Loading branch information
N3X15 committed Jun 7, 2011
1 parent ec0a7ba commit 3dfbd3b
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -44,6 +44,12 @@ public static void offer(BBDataBlock dataBlock) {
private static boolean sendBlocksSQL(Collection<BBDataBlock> collection, WorldManager manager) {
// Try to refactor most of these into the table managers.

// Perform a NOP if nothing's happened.
if(SENDING.size()==0) {
// Hopefully this'll work with all DBMSes or I'll start choking bitches.
BBDB.executeQuery("SELECT 1");
return true;
}
//H2 fix...
if (BBDB.usingDBMS(DBMS.H2)) {
for (BBDataBlock block : collection) {
Expand Down

0 comments on commit 3dfbd3b

Please sign in to comment.