Eventually reconfigure a client connection that gets reused.

This commit is contained in:
Wolfgang Lux 2020-04-06 09:04:08 +02:00
parent 1a0d338a78
commit 535914366a
2 changed files with 17 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2020-04-06 Wolfgang Lux <wolfgang.lux@gmail.com>
* SQLClient.m(initWithConfiguration:name:pool:): Eventually
reconfigure a client connection that gets reused.
2020-03-21 Richard Frith-Macdonald <rfm@gnu.org> 2020-03-21 Richard Frith-Macdonald <rfm@gnu.org>
* Postgres.m: Don't attempt to establish connection before query or * Postgres.m: Don't attempt to establish connection before query or

View file

@ -1803,6 +1803,18 @@ static int poolConnections = 0;
{ {
[self release]; [self release];
self = [existing retain]; self = [existing retain];
if ([conf isKindOfClass: [NSUserDefaults class]] == NO)
{
/* If the configuration object is not the user defaults
* make sure to update the existing connnection's configuration.
*/
n = [NSNotification
notificationWithName: NSUserDefaultsDidChangeNotification
object: conf
userInfo: nil];
[self _configure: n];
}
} }
[clientsLock unlock]; [clientsLock unlock];