Skip to content

Commit

Permalink
Allow port to be 0 in configuration, in order to allow disabling of TCP.
Browse files Browse the repository at this point in the history
  • Loading branch information
giddie authored and antirez committed Feb 22, 2011
1 parent 29920dc commit df50d70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void loadServerConfig(char *filename) {
}
} else if (!strcasecmp(argv[0],"port") && argc == 2) {
server.port = atoi(argv[1]);
if (server.port < 1 || server.port > 65535) {
if (server.port < 0 || server.port > 65535) {
err = "Invalid port"; goto loaderr;
}
} else if (!strcasecmp(argv[0],"bind") && argc == 2) {
Expand Down

0 comments on commit df50d70

Please sign in to comment.