[Spice-devel] [PATCH spice 2/2] Don't crash when a client disconnectecs while there were pending writes

Hans de Goede hdegoede at redhat.com
Tue Oct 12 23:09:20 PDT 2010


---
 server/reds.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index fcdda79..a88ca95 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1894,7 +1894,7 @@ static void reds_main_event(int fd, int event, void *data)
         RedsOutgoingData *outgoing = &reds->outgoing;
         if (reds_send_data()) {
             reds_push();
-            if (!outgoing->item) {
+            if (!outgoing->item && reds->peer) {
                 core->watch_update_mask(reds->peer->watch,
                                         SPICE_WATCH_EVENT_READ);
             }
-- 
1.7.3.1



More information about the Spice-devel mailing list