From ef5b09563ff472be2a999abddf1c13c4b8abcc26 Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Thu, 12 Mar 2020 11:10:55 -0400 Subject: [PATCH] derp: do not treat failure to relay as the fault of the sender If Alice attempts to send a packet to Bob and the DERP server encounters an error on the socket to Bob, we should not disconnect Alice for that. Signed-off-by: David Crawshaw --- derp/derp_server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/derp/derp_server.go b/derp/derp_server.go index 8ffbe6eea..e7dd59542 100644 --- a/derp/derp_server.go +++ b/derp/derp_server.go @@ -320,7 +320,9 @@ func (c *sclient) handleFrameSendPacket(ctx context.Context, ft frameType, fl ui } s.mu.Unlock() } - return err + + // Do not treat a send error as an error with this transmitting client. + return nil } func (s *Server) sendClientKeepAlives(ctx context.Context, c *sclient) {