FIX: CGI hanging when threads are depleted.

Change reading from CGI to only read once.