Remove luacov dependence in test cases
Close socket after use