mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +02:00
fixed streams with zero port being served
This commit is contained in:
parent
ba13b81b0e
commit
a7a922308e
2 changed files with 5 additions and 6 deletions
|
@ -36,6 +36,5 @@ const (
|
||||||
MinPort = 0
|
MinPort = 0
|
||||||
MaxPort = 65535
|
MaxPort = 65535
|
||||||
ErrPort = Port(-1)
|
ErrPort = Port(-1)
|
||||||
NoPort = Port(-1)
|
NoPort = Port(0)
|
||||||
ZeroPort = Port(0)
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -58,7 +58,7 @@ func (r *StreamRoute) String() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *StreamRoute) Start() E.NestedError {
|
func (r *StreamRoute) Start() E.NestedError {
|
||||||
if r.Port.ListeningPort == PT.NoPort || r.started.Load() {
|
if r.Port.ProxyPort == PT.NoPort || r.started.Load() {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
r.ctx, r.cancel = context.WithCancel(context.Background())
|
r.ctx, r.cancel = context.WithCancel(context.Background())
|
||||||
|
|
Loading…
Add table
Reference in a new issue