Reorder send_message's port selection logic, paving the