mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Suppress connection end log output
This is an amendment of https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/merge_requests/30
This commit is contained in:
parent
b35a79ac24
commit
50646698e3
2 changed files with 5 additions and 3 deletions
|
@ -38,6 +38,7 @@ package snowflake_server
|
|||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
|
@ -262,7 +263,7 @@ func (l *SnowflakeListener) acceptSessions(ln *kcp.Listener) error {
|
|||
go func() {
|
||||
defer conn.Close()
|
||||
err := l.acceptStreams(conn)
|
||||
if err != nil && err != io.ErrClosedPipe {
|
||||
if err != nil && !errors.Is(err, io.ErrClosedPipe) {
|
||||
log.Printf("acceptStreams: %v", err)
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue