diff options
author | Alon Levy <alevy@redhat.com> | 2011-04-11 21:42:05 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-08-23 17:58:24 +0300 |
commit | 03cf66383ca9393e6521b96289a53dfc9d7cab60 (patch) | |
tree | d4d134166a84e99dfd51867d770d92a7ce1d8eb0 /server/red_channel.c | |
parent | 4e304ff40f89c8619d462b584ee6ad7d6e10ce93 (diff) |
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.
Diffstat (limited to 'server/red_channel.c')
-rw-r--r-- | server/red_channel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c index 418cf50..a6fee99 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); } |