Browse Source

conn: dont auto set protocol to 2

Don't set the protocol version to 2 by default in conn, this allows us
to test setting unsupported protocol versions
Chris Bannister 9 years ago
parent
commit
6ed31b206e
1 changed files with 0 additions and 6 deletions
  1. 0 6
      conn.go

+ 0 - 6
conn.go

@@ -175,12 +175,6 @@ func Connect(host *HostInfo, addr string, cfg *ConnConfig,
 		return nil, err
 		return nil, err
 	}
 	}
 
 
-	// going to default to proto 2
-	if cfg.ProtoVersion < protoVersion1 || cfg.ProtoVersion > protoVersion4 {
-		log.Printf("unsupported protocol version: %d using 2\n", cfg.ProtoVersion)
-		cfg.ProtoVersion = 2
-	}
-
 	headerSize := 8
 	headerSize := 8
 	if cfg.ProtoVersion > protoVersion2 {
 	if cfg.ProtoVersion > protoVersion2 {
 		headerSize = 9
 		headerSize = 9