about summary refs log tree commit diff
path: root/bounce.c
diff options
context:
space:
mode:
Diffstat (limited to 'bounce.c')
-rw-r--r--bounce.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bounce.c b/bounce.c
index cd4898a..4146c0e 100644
--- a/bounce.c
+++ b/bounce.c
@@ -441,7 +441,7 @@ int main(int argc, char *argv[]) {
 			}
 		}
 
-		if (signals[SIGINT] || signals[SIGTERM]) {
+		if (clientQuit || signals[SIGINT] || signals[SIGTERM]) {
 			break;
 		}
 		if (signals[SIGALRM]) {
@@ -458,6 +458,7 @@ int main(int argc, char *argv[]) {
 		}
 	}
 
+	if (clientQuit && clientQuit[0]) quit = clientQuit;
 	serverFormat("QUIT :%s\r\n", quit);
 	serverClose();
 	for (size_t i = clientIndex; i < event.len; ++i) {