-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Hi,
I am using ObjCHiredis in a Mac objective C program to access a database hosted on a website.
If the connection to the site goes down, the following call fails with an null memory access:
rand_key = [mRedisDB command:@"RANDOMKEY"];
Looking at the header, I don't see a checkConnection type of function. And if the connection fails, this call definitely doesn't fail gracefully. The header shows the following options:
- (id)redis:(NSString_)ipaddress on:(NSNumber_)portnumber db:(NSNumber*)db;
- (id)redis:(NSString_)ipaddress on:(NSNumber_)portnumber;
- (id)redis;
- (BOOL)connect:(NSString_)ipaddress on:(NSNumber_)portnumber;
- (id)command:(NSString*)command;
- (id)commandArgv:(NSArray*)cargv;
- (NSArray*)getReply;
- (BOOL)timesOut;
- (void)close;
Is there anything that I am missing to avoid making this call without an internet connection? Although I am checking for the connection in my program before making the call, it still will fail if the connection goes down between the check and the above call.
Thanks,
Coov
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels