apache / apache/dubbo

[Bug] random port -1 is not effect

Open
#14,569 5 comments 0 reactions 1 assignee Claimed by @heliang666s View on GitHub
component/need-triage type/need-triage
Dominant language
Java
Stars
41.6k
Forks
26.4k
Avg merge
15h 13m
Merged PRs (30d)
4

Description

### Pre-check

- [X] I am sure that all the content I provide is in English.

### Search before asking

- [X] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.

### Apache Dubbo Component

Java SDK (apache/dubbo)

### Dubbo Version

3.3.0-beta.4

### Steps to reproduce this issue

when i use port -1 ,it use a defaultPort 20880
` ProtocolConfig protocolConfig = new ProtocolConfig(CommonConstants.DUBBO, -1);`

image

### What you expected to happen

when i use port -1 ,i want it use a port random

### Anything else

_No response_

### Are you willing to submit a pull request to fix on your own?

- [ ] Yes I am willing to submit a pull request on my own!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.