Skip to content
Permalink
Browse files

[ogr provider] disable connection timeouts

  • Loading branch information
nirvn committed Aug 15, 2018
1 parent 270ac21 commit be04eeb0e39d662fb4b3e3c296f2e93bb0b24bf0
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/providers/ogr/qgsogrfeatureiterator.cpp
@@ -43,8 +43,11 @@ QgsOgrFeatureIterator::QgsOgrFeatureIterator( QgsOgrFeatureSource *source, bool
, mFilterFids( mRequest.filterFids() )
, mFilterFidsIt( mFilterFids.constBegin() )
{
// Since connection timeout for OGR connections is problematic and can lead to crashes, disable for now.
mRequest.setConnectionTimeout( -1 );

//QgsDebugMsg( "Feature iterator of " + mSource->mLayerName + ": acquiring connection");
mConn = QgsOgrConnPool::instance()->acquireConnection( QgsOgrProviderUtils::connectionPoolId( mSource->mDataSource ), request.connectionTimeout(), request.requestMayBeNested() );
mConn = QgsOgrConnPool::instance()->acquireConnection( QgsOgrProviderUtils::connectionPoolId( mSource->mDataSource ), mRequest.connectionTimeout(), mRequest.requestMayBeNested() );
if ( !mConn->ds )
{
return;

0 comments on commit be04eeb

Please sign in to comment.
You can’t perform that action at this time.