summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/quick.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/quick.c b/bin/quick.c
index cfd871fe..d814873d 100644
--- a/bin/quick.c
+++ b/bin/quick.c
@@ -122,6 +122,9 @@ int main(int argc, char *argv[]) {
 	if (server < 0) err(EX_OSERR, "socket");
 	fcntl(server, F_SETFD, FD_CLOEXEC);
 
+	int on = 1;
+	setsockopt(server, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
+
 	struct sockaddr_in addr = {
 		.sin_family = AF_INET,
 		.sin_port = htons(port),