mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-14 05:11:19 -04:00
Initialize SnowflakeListener.closed
Fixes a bug where an uninitialized channel causes a panic when closed (#40099).
This commit is contained in:
parent
e6e5e20ae8
commit
bcc162898a
1 changed files with 5 additions and 1 deletions
|
@ -75,7 +75,11 @@ func NewSnowflakeServer(getCertificate func(*tls.ClientHelloInfo) (*tls.Certific
|
|||
// Listen starts a listener on addr that will accept both turbotunnel
|
||||
// and legacy Snowflake connections.
|
||||
func (t *Transport) Listen(addr net.Addr) (*SnowflakeListener, error) {
|
||||
listener := &SnowflakeListener{addr: addr, queue: make(chan net.Conn, 65534)}
|
||||
listener := &SnowflakeListener{
|
||||
addr: addr,
|
||||
queue: make(chan net.Conn, 65534),
|
||||
closed: make(chan struct{}),
|
||||
}
|
||||
|
||||
handler := httpHandler{
|
||||
// pconn is shared among all connections to this server. It
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue