close socket connection after sending a response to avoid FD leakage