summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordelano <delano@solutious.com>2011-01-14 18:02:24 -0500
committerdelano <delano@solutious.com>2011-01-14 18:02:24 -0500
commit4c6da271c97c72c875460181658a9128fbbb69e3 (patch)
tree032789a2fd957cc612524f30b18b405fdd52f8f4
parentb56b2a7f7e79b5296040dd1cbc30c543452c918d (diff)
downloadnet-ssh-4c6da271c97c72c875460181658a9128fbbb69e3.tar.gz
Fix for process code to correctly wait until remote_id is set before sending any output, including eof.
-rw-r--r--CHANGELOG.rdoc5
-rw-r--r--lib/net/ssh/connection/channel.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.rdoc b/CHANGELOG.rdoc
index 95e595c..4e277e2 100644
--- a/CHANGELOG.rdoc
+++ b/CHANGELOG.rdoc
@@ -1,4 +1,9 @@
+=== 2.0.23 / 14 Jan 2011
+
+* Fix for process code to correctly wait until remote_id is set before sending any output, including eof. [Markus Roberts]
+
+
=== 2.0.23 / 03 Jun 2010
* delay CHANNEL_EOF packet until output buffer is empty [Rich Lane]
diff --git a/lib/net/ssh/connection/channel.rb b/lib/net/ssh/connection/channel.rb
index dee44f4..505efaf 100644
--- a/lib/net/ssh/connection/channel.rb
+++ b/lib/net/ssh/connection/channel.rb
@@ -311,7 +311,7 @@ module Net; module SSH; module Connection
@on_process.call(self) if @on_process
enqueue_pending_output
- if @eof and not @sent_eof and output.empty?
+ if @eof and not @sent_eof and output.empty? and remote_id
connection.send_message(Buffer.from(:byte, CHANNEL_EOF, :long, remote_id))
@sent_eof = true
end