Suppress warnings about null socket or invalid resource.