summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-04-11 21:42:05 +0300
committerAlon Levy <alevy@redhat.com>2011-08-23 17:58:24 +0300
commit03cf66383ca9393e6521b96289a53dfc9d7cab60 (patch)
treed4d134166a84e99dfd51867d770d92a7ce1d8eb0
parent4e304ff40f89c8619d462b584ee6ad7d6e10ce93 (diff)
downloadspice-03cf66383ca9393e6521b96289a53dfc9d7cab60.tar.gz
spice-03cf66383ca9393e6521b96289a53dfc9d7cab60.tar.xz
spice-03cf66383ca9393e6521b96289a53dfc9d7cab60.zip
server/red_channel: ignore error if already shutdown
on red_channel_peer_on_incoming_error, if we are already shutdown, do not call the channel's error handler. Since the channel has been shutdown, we assume this is a second or later error, and handling has already occured.
-rw-r--r--server/red_channel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index 418cf500..a6fee999 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -220,6 +220,9 @@ void red_channel_client_default_peer_on_error(RedChannelClient *rcc)
static void red_channel_peer_on_incoming_error(RedChannelClient *rcc)
{
+ if (rcc->stream->shutdown) {
+ return; // assume error has already been handled which caused the shutdown.
+ }
rcc->channel->on_incoming_error(rcc);
}