Commit c0b6e082 authored by Cecylia Bocovich's avatar Cecylia Bocovich
Browse files

Don't log errors from callng close on OR conns

Snowflake copies data between the OR connection and the KCP stream,
meaning that in most cases the copy loops will only terminate once the
OR connection times out. In this case the OR connection is already
closed and so calls to CloseRead and CloseWrite will generate errors.
parent 720d2b8e
Pipeline #4036 failed with stage
in 5 minutes and 27 seconds
......@@ -76,9 +76,7 @@ func proxy(local *net.TCPConn, conn net.Conn) {
if _, err := io.Copy(conn, local); err != nil && err != io.ErrClosedPipe {
log.Printf("error copying ORPort to WebSocket %v", err)
}
if err := local.CloseRead(); err != nil {
log.Printf("error closing read after copying ORPort to WebSocket %v", err)
}
local.CloseRead()
conn.Close()
wg.Done()
}()
......@@ -86,9 +84,7 @@ func proxy(local *net.TCPConn, conn net.Conn) {
if _, err := io.Copy(local, conn); err != nil && err != io.ErrClosedPipe {
log.Printf("error copying WebSocket to ORPort %v", err)
}
if err := local.CloseWrite(); err != nil {
log.Printf("error closing write after copying WebSocket to ORPort %v", err)
}
local.CloseWrite()
conn.Close()
wg.Done()
}()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment