diff --git a/qemu-char.c b/qemu-char.c index 62594965bd..f7f5464b67 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1026,15 +1026,11 @@ static gboolean pty_chr_timer(gpointer opaque) struct CharDriverState *chr = opaque; PtyCharDriver *s = chr->opaque; - if (s->connected) { - goto out; - } - - /* Next poll ... */ - pty_chr_update_read_handler(chr); - -out: s->timer_tag = 0; + if (!s->connected) { + /* Next poll ... */ + pty_chr_update_read_handler(chr); + } return FALSE; }