mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
wgengine/magicsock: log when a ReceiveFunc fails
Updates #10976 Change-Id: I86d30151a25c7d42ed36e273fb207873f4acfdb4 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
74b9fa1348
commit
2dd71e64ac
@@ -1274,10 +1274,15 @@ func (c *Conn) mkReceiveFunc(ruc *RebindingUDPConn, healthItem *health.ReceiveFu
|
||||
// epCache caches an IPPort->endpoint for hot flows.
|
||||
var epCache ippEndpointCache
|
||||
|
||||
return func(buffs [][]byte, sizes []int, eps []conn.Endpoint) (int, error) {
|
||||
return func(buffs [][]byte, sizes []int, eps []conn.Endpoint) (_ int, retErr error) {
|
||||
if healthItem != nil {
|
||||
healthItem.Enter()
|
||||
defer healthItem.Exit()
|
||||
defer func() {
|
||||
if retErr != nil {
|
||||
c.logf("Receive func %s exiting with error: %T, %v", healthItem.Name(), retErr, retErr)
|
||||
}
|
||||
}()
|
||||
}
|
||||
if ruc == nil {
|
||||
panic("nil RebindingUDPConn")
|
||||
|
Reference in New Issue
Block a user