Fix bug: local client close socket before proxy handle it.
Fix bug: correctly handle persistent connection.