mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 04:28:20 +01:00
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.
This commit is contained in:
parent
dace50628c
commit
3b19f2a7ed
@ -7,7 +7,12 @@ while 1 do
|
|||||||
print("server: waiting for client connection...");
|
print("server: waiting for client connection...");
|
||||||
control = assert(server:accept());
|
control = assert(server:accept());
|
||||||
while 1 do
|
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));
|
assert(control:send(ack));
|
||||||
print(command);
|
print(command);
|
||||||
(loadstring(command))();
|
(loadstring(command))();
|
||||||
|
Loading…
Reference in New Issue
Block a user