From: Stephen Seo Date: Thu, 29 Aug 2024 07:48:43 +0000 (+0900) Subject: Add hint to error when binding socket X-Git-Tag: 1.0~101 X-Git-Url: https://git.seodisparate.com/js/bootstrap.bundle.min.js?a=commitdiff_plain;h=77945f34b9b8d5b39379f607c73418e013198922;p=c_simple_http Add hint to error when binding socket --- diff --git a/src/tcp_socket.c b/src/tcp_socket.c index 72826f0..d8f4474 100644 --- a/src/tcp_socket.c +++ b/src/tcp_socket.c @@ -74,7 +74,8 @@ int create_tcp_socket(unsigned short port) { sizeof(struct sockaddr_in6)); if (ret != 0) { close(tcp_socket); - puts("ERROR: Failed to bind socket!"); + puts("ERROR: Failed to bind socket! (Maybe just attempted to reuse socket " + "that didn't get \"cleaned up\" yet? Use different port?)"); return -1; }