summaryrefslogtreecommitdiff
path: root/chardev
diff options
context:
space:
mode:
Diffstat (limited to 'chardev')
-rw-r--r--chardev/char-socket.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/chardev/char-socket.c b/chardev/char-socket.c
index e85250b624..743b7b11cd 100644
--- a/chardev/char-socket.c
+++ b/chardev/char-socket.c
@@ -1035,7 +1035,14 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
}
/* Validate any options which have a dependancy on client vs server */
- if (!(sock->has_server && sock->server)) {
+ if (!sock->has_server || sock->server) {
+ if (sock->has_reconnect) {
+ error_setg(errp,
+ "'reconnect' option is incompatible with "
+ "socket in server listen mode");
+ return false;
+ }
+ } else {
if (sock->has_websocket && sock->websocket) {
error_setg(errp, "%s", "Websocket client is not implemented");
return false;