Removed dead thread connections once they have completed their tasks (or the connection dies). Updated relevant test case
Server side javadocs