From c06b5ea2f6e9f65629a8f87a88fa92aa587bafc4 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Mon, 1 Aug 2011 02:37:55 +0200 Subject: [PATCH] * Always wait for DatabaseResolvers to finish before shunting queries. --- src/libtomahawk/database/databaseresolver.h | 4 ++-- src/libtomahawk/pipeline.cpp | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libtomahawk/database/databaseresolver.h b/src/libtomahawk/database/databaseresolver.h index 11abb80a0..d1ac4845c 100644 --- a/src/libtomahawk/database/databaseresolver.h +++ b/src/libtomahawk/database/databaseresolver.h @@ -1,5 +1,5 @@ /* === This file is part of Tomahawk Player - === - * + * * Copyright 2010-2011, Christian Muehlhaeuser * * Tomahawk is free software: you can redistribute it and/or modify @@ -36,7 +36,7 @@ public: virtual QString name() const; virtual unsigned int weight() const { return m_weight; } virtual unsigned int preference() const { return 100; } - virtual unsigned int timeout() const { return 2500; } + virtual unsigned int timeout() const { return 0; } public slots: virtual void resolve( const Tomahawk::query_ptr& query ); diff --git a/src/libtomahawk/pipeline.cpp b/src/libtomahawk/pipeline.cpp index 7828b9027..4ecb05138 100644 --- a/src/libtomahawk/pipeline.cpp +++ b/src/libtomahawk/pipeline.cpp @@ -285,7 +285,9 @@ Pipeline::shunt( const query_ptr& q ) emit resolving( q ); m_qidsTimeout.insert( q->id(), true ); - new FuncTimeout( r->timeout(), boost::bind( &Pipeline::timeoutShunt, this, q ), this ); + + if ( r->timeout() > 0 ) + new FuncTimeout( r->timeout(), boost::bind( &Pipeline::timeoutShunt, this, q ), this ); } else {