From 3b19f2a7edbcde798a9cf5f1f6175d360e891744 Mon Sep 17 00:00:00 2001 From: Sam Roberts Date: Mon, 8 Aug 2011 16:23:06 -0700 Subject: [PATCH] testsrvr asserts when test finishes successfully. When the test client finishes, the test server asserts with a "closed" message. After looking carefully at this, I think the tests are running successfully and passing. Since it appears to be a test failure, I modified the server to allow the client to close the control connection. --- test/testsrvr.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/testsrvr.lua b/test/testsrvr.lua index f1972c2..4be4069 100644 --- a/test/testsrvr.lua +++ b/test/testsrvr.lua @@ -7,7 +7,12 @@ while 1 do print("server: waiting for client connection..."); control = assert(server:accept()); while 1 do - command = assert(control:receive()); + command, emsg = control:receive(); + if emsg == "closed" then + control:close() + break + end + assert(command, emsg) assert(control:send(ack)); print(command); (loadstring(command))();