Remove a race hazard from the execrable Support_TestWebServer
Use of this class was resulting in threads being left in a spinning state due to the accept socket being closed but "running" still being true: the exception thrown from Socket.accept() was being swallowed. This is likely because there is a race between the thread actually starting (i.e. run() actually executing) and, in short-lived tests, the server being shutdown: if AcceptThread.close() was called before AcceptThread.run() then when run() actually executed it would loop forever. Some dead code has been removed. Test: Ran the CTS tests Bug: 29820565 Bug: 29365528 (cherry picked from commit 5558171b) Change-Id: I895ecbd171c9495ddda85de740519ba1b2c51d62
Loading
Please sign in to comment