Pārlūkot izejas kodu

bep/1.0 negotiation can't be a hard error.

Jakob Borg 10 gadi atpakaļ
vecāks
revīzija
51c932164f
1 mainītis faili ar 3 papildinājumiem un 4 dzēšanām
  1. 3 4
      cmd/syncthing/connections.go

+ 3 - 4
cmd/syncthing/connections.go

@@ -44,12 +44,11 @@ next:
 		cs := conn.ConnectionState()
 
 		// We should have negotiated the next level protocol "bep/1.0" as part
-		// of the TLS handshake. If we didn't, we're not speaking to another
-		// BEP-speaker so drop the connection.
+		// of the TLS handshake. Unfortunately this can't be a hard error,
+		// because there are implementations out there that don't support
+		// protocol negotiation (iOS for one...).
 		if !cs.NegotiatedProtocolIsMutual || cs.NegotiatedProtocol != bepProtocolName {
 			l.Infof("Peer %s did not negotiate bep/1.0", conn.RemoteAddr())
-			conn.Close()
-			continue
 		}
 
 		// We should have received exactly one certificate from the other