diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -14,6 +14,8 @@ int main() { perror("could not open socket"); return 1; } + int opt = 1; + setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)); int bind_addr = bind(sfd, (struct sockaddr *)&addr, sizeof(addr)); if (bind_addr == -1) { perror("could not bind socket"); |
