diff options
Diffstat (limited to 'qemu-char.c')
-rw-r--r-- | qemu-char.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qemu-char.c b/qemu-char.c index 1fbccf02ac..84eb8a1fb4 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2858,6 +2858,10 @@ static void tcp_chr_update_read_handler(CharDriverState *chr) { TCPCharDriver *s = chr->opaque; + if (!s->connected) { + return; + } + remove_fd_in_watch(chr); if (s->ioc) { chr->fd_in_tag = io_add_watch_poll(s->ioc, |