Skip to content

Commit 3509791

Browse files
committed
set port = -1 if use Unix Domain Socket
1 parent bbd6ae7 commit 3509791

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

examples/tcp_echo_server.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ int main(int argc, char** argv) {
102102
#if ENABLE_UDS
103103
if (port == 0) {
104104
host = argv[1];
105+
port = -1;
105106
}
106107
#endif
107108

examples/udp_echo_server.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ int main(int argc, char** argv) {
5353
#if ENABLE_UDS
5454
if (port == 0) {
5555
host = argv[1];
56+
port = -1;
5657
}
5758
#endif
5859

0 commit comments

Comments
 (0)