# HG changeset patch
# User Hubert Chathi <hubert@uhoreg.ca>
# Date 1275932566 14400
# Node ID 0712fda16ab6537453aef423dcd50703ce7a0998
# Parent  37540f89d4e28b72783eea95bd345e717e781ac5
close connection when no more input is available in interactive mode

diff -r 37540f89d4e2 -r 0712fda16ab6 clix/send.lua
--- 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