mirror of
				https://github.com/lunarmodules/luasocket.git
				synced 2025-10-31 10:25:55 +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:
		| @@ -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))(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user