|
@@ -1536,12 +1536,19 @@ gboolean vnc_client_io(QIOChannel *ioc G_GNUC_UNUSED,
|
|
VncState *vs = opaque;
|
|
VncState *vs = opaque;
|
|
if (condition & G_IO_IN) {
|
|
if (condition & G_IO_IN) {
|
|
if (vnc_client_read(vs) < 0) {
|
|
if (vnc_client_read(vs) < 0) {
|
|
- return TRUE;
|
|
|
|
|
|
+ goto end;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (condition & G_IO_OUT) {
|
|
if (condition & G_IO_OUT) {
|
|
vnc_client_write(vs);
|
|
vnc_client_write(vs);
|
|
}
|
|
}
|
|
|
|
+end:
|
|
|
|
+ if (vs->disconnecting) {
|
|
|
|
+ if (vs->ioc_tag != 0) {
|
|
|
|
+ g_source_remove(vs->ioc_tag);
|
|
|
|
+ }
|
|
|
|
+ vs->ioc_tag = 0;
|
|
|
|
+ }
|
|
return TRUE;
|
|
return TRUE;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1630,6 +1637,12 @@ void vnc_flush(VncState *vs)
|
|
if (vs->ioc != NULL && vs->output.offset) {
|
|
if (vs->ioc != NULL && vs->output.offset) {
|
|
vnc_client_write_locked(vs);
|
|
vnc_client_write_locked(vs);
|
|
}
|
|
}
|
|
|
|
+ if (vs->disconnecting) {
|
|
|
|
+ if (vs->ioc_tag != 0) {
|
|
|
|
+ g_source_remove(vs->ioc_tag);
|
|
|
|
+ }
|
|
|
|
+ vs->ioc_tag = 0;
|
|
|
|
+ }
|
|
vnc_unlock_output(vs);
|
|
vnc_unlock_output(vs);
|
|
}
|
|
}
|
|
|
|
|