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.
master
Sam Roberts 2011-08-08 16:23:06 -07:00
parent dace50628c
commit 3b19f2a7ed
1 changed files with 6 additions and 1 deletions

View File

@ -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))();