diff options
| -rw-r--r-- | test/testsrvr.lua | 7 |
1 files changed, 6 insertions, 1 deletions
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 | |||
| 7 | print("server: waiting for client connection..."); | 7 | print("server: waiting for client connection..."); |
| 8 | control = assert(server:accept()); | 8 | control = assert(server:accept()); |
| 9 | while 1 do | 9 | while 1 do |
| 10 | command = assert(control:receive()); | 10 | command, emsg = control:receive(); |
| 11 | if emsg == "closed" then | ||
| 12 | control:close() | ||
| 13 | break | ||
| 14 | end | ||
| 15 | assert(command, emsg) | ||
| 11 | assert(control:send(ack)); | 16 | assert(control:send(ack)); |
| 12 | print(command); | 17 | print(command); |
| 13 | (loadstring(command))(); | 18 | (loadstring(command))(); |
