[bugfix] close socket when gtest exit