aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_connection_manager.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2012-04-20 12:26:31 +0200
committerIngela Anderton Andin <[email protected]>2012-04-20 14:24:27 +0200
commite38ddd90b672b368743b4e81e97c3243fa9e4c45 (patch)
treeaeba561037afc7526150ea597483ab858670daf3 /lib/ssh/src/ssh_connection_manager.erl
parenta76628f8f0de895e318c11585a53983e476d692c (diff)
downloadotp-e38ddd90b672b368743b4e81e97c3243fa9e4c45.tar.gz
otp-e38ddd90b672b368743b4e81e97c3243fa9e4c45.tar.bz2
otp-e38ddd90b672b368743b4e81e97c3243fa9e4c45.zip
Avoid sending two ssh close messages
Diffstat (limited to 'lib/ssh/src/ssh_connection_manager.erl')
-rw-r--r--lib/ssh/src/ssh_connection_manager.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_connection_manager.erl b/lib/ssh/src/ssh_connection_manager.erl
index e993f597a5..8c1f88e572 100644
--- a/lib/ssh/src/ssh_connection_manager.erl
+++ b/lib/ssh/src/ssh_connection_manager.erl
@@ -384,9 +384,10 @@ handle_call({close, ChannelId}, _,
#state{connection = Pid, connection_state =
#connection{channel_cache = Cache}} = State) ->
case ssh_channel:cache_lookup(Cache, ChannelId) of
- #channel{remote_id = Id} ->
+ #channel{remote_id = Id} = Channel ->
send_msg({connection_reply, Pid,
ssh_connection:channel_close_msg(Id)}),
+ ssh_channel:cache_update(Cache, Channel#channel{sent_close = true}),
{reply, ok, State};
undefined ->
{reply, ok, State}