Eventually reconfigure a client connection that gets reused

This commit is contained in:
Wolfgang Lux 2020-04-08 14:24:39 +02:00
parent 535914366a
commit 7851639677
2 changed files with 16 additions and 3 deletions

View file

@ -1,7 +1,8 @@
2020-04-06 Wolfgang Lux <wolfgang.lux@gmail.com>
2020-04-08 Wolfgang Lux <wolfgang.lux@gmail.com>
* SQLClient.m(initWithConfiguration:name:pool:): Eventually
reconfigure a client connection that gets reused.
* SQLClient.m (clientWithConfiguration:name:):
* SQLClient.m (initWithConfiguration:name:pool:):
Eventually reconfigure a client connection that gets reused.
2020-03-21 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -1246,6 +1246,18 @@ static int poolConnections = 0;
o = [[[SQLClient alloc] initWithConfiguration: config name: reference]
autorelease];
}
else if ([config isKindOfClass: [NSUserDefaults class]] == NO)
{
/* If the configuration object is not the user defaults
* make sure to update the existing connnection's configuration.
*/
NSNotification *n = [NSNotification
notificationWithName: NSUserDefaultsDidChangeNotification
object: config
userInfo: nil];
[o _configure: n];
}
return o;
}