File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ func (ip *icmpProxy) Serve(ctx context.Context) error {
202202 // In unit test, we found out when the listener listens on 0.0.0.0, the socket reads the full packet after
203203 // the second reply
204204 if err := ip .handleFullPacket (icmpDecoder , buf [:n ]); err != nil {
205- ip .logger .Err (err ).Str ("dst" , from .String ()).Msg ("Failed to parse ICMP reply as full packet" )
205+ ip .logger .Debug (). Err (err ).Str ("dst" , from .String ()).Msg ("Failed to parse ICMP reply as full packet" )
206206 }
207207 continue
208208 }
Original file line number Diff line number Diff line change 44 "context"
55 "errors"
66 "fmt"
7+ "net"
78 "strings"
89 "time"
910
@@ -155,7 +156,11 @@ func (s *Supervisor) Run(
155156 if s .edgeTunnelServer .icmpRouter != nil {
156157 go func () {
157158 if err := s .edgeTunnelServer .icmpRouter .Serve (ctx ); err != nil {
158- s .log .Logger ().Err (err ).Msg ("icmp router terminated" )
159+ if errors .Is (err , net .ErrClosed ) {
160+ s .log .Logger ().Info ().Err (err ).Msg ("icmp router terminated" )
161+ } else {
162+ s .log .Logger ().Err (err ).Msg ("icmp router terminated" )
163+ }
159164 }
160165 }()
161166 }
You can’t perform that action at this time.
0 commit comments