diff --git a/app/commander/outbound.go b/app/commander/outbound.go index 92be34a9a..19b900108 100644 --- a/app/commander/outbound.go +++ b/app/commander/outbound.go @@ -76,8 +76,6 @@ func (co *CommanderOutbound) Dispatch(ctx context.Context, r ray.OutboundRay) { co.listener.add(c) co.access.RUnlock() <-closeSignal.Wait() - - return } func (co *CommanderOutbound) Tag() string { diff --git a/common/protocol/address.go b/common/protocol/address.go index bdd2a2081..f7d322209 100644 --- a/common/protocol/address.go +++ b/common/protocol/address.go @@ -150,10 +150,8 @@ func (p *AddressParser) ReadAddressPort(buffer *buf.Buffer, input io.Reader) (ne } func (p *AddressParser) writePort(writer io.Writer, port net.Port) error { - if _, err := writer.Write(port.Bytes(nil)); err != nil { - return err - } - return nil + _, err := writer.Write(port.Bytes(nil)) + return err } func (p *AddressParser) writeAddress(writer io.Writer, address net.Address) error {