Return fail on failing to bind socket
This commit is contained in:
parent
cc21e5d205
commit
b48f1890bf
1 changed files with 3 additions and 0 deletions
|
@ -42,6 +42,9 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
__attribute__((cleanup(cleanup_tcp_socket))) int tcp_socket =
|
__attribute__((cleanup(cleanup_tcp_socket))) int tcp_socket =
|
||||||
create_tcp_socket(args.port);
|
create_tcp_socket(args.port);
|
||||||
|
if (tcp_socket == -1) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
struct timespec sleep_time;
|
struct timespec sleep_time;
|
||||||
sleep_time.tv_sec = 0;
|
sleep_time.tv_sec = 0;
|
||||||
|
|
Loading…
Reference in a new issue