* check the status of socket before shutting down * remove socket status checking & ignore OSError exception