File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -237,9 +237,10 @@ Task Open(bool async, CancellationToken cancellationToken)
237237 var mapper = Connector . TypeMapper ;
238238 if ( mapper . ChangeCounter != TypeMapping . GlobalTypeMapper . Instance . ChangeCounter )
239239 {
240- // We always do this synchronously which isn't amazing but not very important
240+ // We always do this synchronously which isn't amazing but not very important, because
241+ // it's supposed to be a pretty rare event and the whole point is to keep this method
242+ // non-async
241243 Connector . LoadDatabaseInfo ( NpgsqlTimeout . Infinite , false ) . GetAwaiter ( ) . GetResult ( ) ;
242- mapper . Reset ( ) ;
243244 }
244245
245246 Debug . Assert ( Connector . Connection != null , "Open done but connector not set on Connection" ) ;
@@ -307,10 +308,7 @@ async Task OpenLong()
307308 // or global mappings may have changed. Bring this up to date if needed.
308309 mapper = Connector . TypeMapper ;
309310 if ( mapper . ChangeCounter != TypeMapping . GlobalTypeMapper . Instance . ChangeCounter )
310- {
311311 await Connector . LoadDatabaseInfo ( NpgsqlTimeout . Infinite , async) ;
312- mapper . Reset ( ) ;
313- }
314312 }
315313
316314 // We may have gotten an already enlisted pending connector above, no need to enlist in that case
You can’t perform that action at this time.
0 commit comments