Changeset

36:0712fda16ab6

close connection when no more input is available in interactive mode
author Hubert Chathi <hubert@uhoreg.ca>
date Mon, 07 Jun 2010 13:42:46 -0400
parents 35:37540f89d4e2
children 37:bb7a51aca282
files clix/send.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/clix/send.lua	Sun May 30 02:56:40 2010 +0100
+++ b/clix/send.lua	Mon Jun 07 13:42:46 2010 -0400
@@ -25,6 +25,9 @@
 				close = function () end;
 				receive = function (_, patt)
 					local data = io.stdin:read(patt);
+					if data == nil then
+						conn:close();
+					end
 					if opts.echo then
 						io.write(data, patt == "*l" and "\n" or "");
 					end