Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
8cbedcec
Commit
8cbedcec
authored
Oct 25, 2012
by
Charles Longeau
Browse files
make redisConnectWithTimeout connect to 127.0.0.1 instead of 127.0.0.2
parent
0fff0f18
Changes
1
Hide whitespace changes
Inline
Side-by-side
example.c
View file @
8cbedcec
...
...
@@ -10,7 +10,7 @@ int main(void) {
redisReply
*
reply
;
struct
timeval
timeout
=
{
1
,
500000
};
// 1.5 seconds
c
=
redisConnectWithTimeout
((
char
*
)
"127.0.0.
2
"
,
6379
,
timeout
);
c
=
redisConnectWithTimeout
((
char
*
)
"127.0.0.
1
"
,
6379
,
timeout
);
if
(
c
->
err
)
{
printf
(
"Connection error: %s
\n
"
,
c
->
errstr
);
exit
(
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment