aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-07-08 17:58:09 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-07-08 17:58:09 +0000
commit43ff216fa6eab2ba27f50ade9308cb30567dfcc7 (patch)
tree02dd592a95eed3261f1bd1530ce5701a5738e5df
parentff54332b66b4739041f8f8a617a286add2d7896b (diff)
downloadrtmux-43ff216fa6eab2ba27f50ade9308cb30567dfcc7.tar.gz
rtmux-43ff216fa6eab2ba27f50ade9308cb30567dfcc7.tar.bz2
rtmux-43ff216fa6eab2ba27f50ade9308cb30567dfcc7.zip
When sending a "protocol mismatch" error message, tell the client to exit
afterwards, otherwise it hangs.
-rw-r--r--server-msg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server-msg.c b/server-msg.c
index 761e7bb1..17b67b65 100644
--- a/server-msg.c
+++ b/server-msg.c
@@ -1,4 +1,4 @@
-/* $Id: server-msg.c,v 1.69 2009-06-25 16:21:32 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);
}