forked from quic-go/quic-go
proxy: remove QuicProxy.LocalPort method (#4920)
This commit is contained in:
@@ -209,6 +209,7 @@ func NewQuicProxy(local string, opts *Opts) (*QuicProxy, error) {
|
||||
func (p *QuicProxy) Close() error {
|
||||
p.mutex.Lock()
|
||||
defer p.mutex.Unlock()
|
||||
|
||||
close(p.closeChan)
|
||||
for _, c := range p.clientDict {
|
||||
if err := c.ServerConn.Close(); err != nil {
|
||||
@@ -225,11 +226,6 @@ func (p *QuicProxy) LocalAddr() net.Addr {
|
||||
return p.conn.LocalAddr()
|
||||
}
|
||||
|
||||
// LocalPort is the UDP port number the proxy is listening on.
|
||||
func (p *QuicProxy) LocalPort() int {
|
||||
return p.conn.LocalAddr().(*net.UDPAddr).Port
|
||||
}
|
||||
|
||||
func (p *QuicProxy) newConnection(cliAddr *net.UDPAddr) (*connection, error) {
|
||||
conn, err := net.DialUDP("udp", nil, p.serverAddr)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user