summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-07-07 12:34:48 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-07-07 12:34:48 +0000
commitc3089c5ec2b2f063b13392f32289e38c7d3164c9 (patch)
treef2b27724b6773a522e8c5d9bc516d88e6092cf38
parent1340466e7b5c0619f81916c63ff7e64d8d270794 (diff)
When sending a "protocol mismatch" error message, tell the client to exit
afterwards, otherwise it hangs.
-rw-r--r--usr.bin/tmux/server-msg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/tmux/server-msg.c b/usr.bin/tmux/server-msg.c
index 2bd6ef813cc..17b67b6554a 100644
--- a/usr.bin/tmux/server-msg.c
+++ b/usr.bin/tmux/server-msg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: server-msg.c,v 1.3 2009/06/05 11:14:13 nicm Exp $ */
+/* $OpenBSD: server-msg.c,v 1.4 2009/07/07 12:34:47 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -189,6 +189,7 @@ server_msg_fn_identify(struct hdr *hdr, struct client *c)
#define MSG "protocol version mismatch"
server_write_client(c, MSG_ERROR, MSG, (sizeof MSG) - 1);
#undef MSG
+ server_write_client(c, MSG_EXIT, NULL, 0);
return (0);
}