Fixed sim_check_conn to return error status if the socket being checked is writable and no peer name exists (i.e. when a connect has failed). Suggested by Paul Koning