* close socket when exception happened.
* remove source warnings
* remove unnecessary log level judgement