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
redis
Commits
68d6345d
"doc/LpopCommand.html" did not exist on "81d456450ac42b7cf78367ae3a89af1a543c9ff1"
Commit
68d6345d
authored
Feb 07, 2011
by
antirez
Browse files
If port zero is specified, Redis will not listen for TCP connections
parent
452229b6
Changes
2
Show whitespace changes
Inline
Side-by-side
redis.conf
View file @
68d6345d
...
@@ -21,6 +21,7 @@ daemonize no
...
@@ -21,6 +21,7 @@ daemonize no
pidfile
/
var
/
run
/
redis
.
pid
pidfile
/
var
/
run
/
redis
.
pid
# Accept connections on the specified port, default is 6379.
# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
port
6379
port
6379
# If you want you can bind a single interface, if the bind option is not
# If you want you can bind a single interface, if the bind option is not
...
...
src/redis.c
View file @
68d6345d
...
@@ -864,7 +864,10 @@ void initServer() {
...
@@ -864,7 +864,10 @@ void initServer() {
createSharedObjects
();
createSharedObjects
();
server
.
el
=
aeCreateEventLoop
();
server
.
el
=
aeCreateEventLoop
();
server
.
db
=
zmalloc
(
sizeof
(
redisDb
)
*
server
.
dbnum
);
server
.
db
=
zmalloc
(
sizeof
(
redisDb
)
*
server
.
dbnum
);
if
(
server
.
port
!=
0
)
server
.
ipfd
=
anetTcpServer
(
server
.
neterr
,
server
.
port
,
server
.
bindaddr
);
server
.
ipfd
=
anetTcpServer
(
server
.
neterr
,
server
.
port
,
server
.
bindaddr
);
if
(
server
.
ipfd
==
ANET_ERR
)
{
if
(
server
.
ipfd
==
ANET_ERR
)
{
redisLog
(
REDIS_WARNING
,
"Opening port: %s"
,
server
.
neterr
);
redisLog
(
REDIS_WARNING
,
"Opening port: %s"
,
server
.
neterr
);
exit
(
1
);
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