Add additional assert for checking port_no.