Skip to content

Can't get actual port from ServerConfig when using random port #1022

Description

@javeme

Describe the bug

A clear and concise description of what the bug is.

Expected behavior

Expect to add port() method to com.alipay.sofa.rpc.server.Server interface, we can get the actual port from server implementation.

Actual behavior

ServerConfig.getPort() returns 0

Steps to reproduce

new ServerConfig().setPort(0)
                  .setHost("127.0.0.1")
                  .setProtocol("bolt")

Environment

  • SOFARPC version: 5.7.6
  • JVM version : java8
  • OS version : mac
  • Maven version:
  • IDE version: eclipse

Metadata

Metadata

Assignees

Labels

SOFA-8th-ChallengeSOFA 8th Challenge eventeasyquestionFurther information is requestedremindTo be further discussed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions