Fix: APIS-603, Even if timeout occurs, the socket doesn't seem to get closed.