Skip to content
Snippets Groups Projects
Commit 63f23c47 authored by ale's avatar ale
Browse files

Apparently protocol v3 still has no response to HELLO

The documentation seems to imply otherwise?
parent ccbb1d30
No related branches found
No related tags found
No related merge requests found
Pipeline #57994 passed
...@@ -72,12 +72,6 @@ func (p *DictProxyServer) handleHello(ctx context.Context, lw unix.LineResponseW ...@@ -72,12 +72,6 @@ func (p *DictProxyServer) handleHello(ctx context.Context, lw unix.LineResponseW
return fmt.Errorf("unsupported protocol version %d", majorVersion) return fmt.Errorf("unsupported protocol version %d", majorVersion)
} }
// In version 3, HELLO expects a response.
if majorVersion == 3 {
s := fmt.Sprintf("O%d\t0", majorVersion)
return lw.WriteLineCRLF([]byte(s))
}
return nil return nil
} }
......
...@@ -93,16 +93,6 @@ func makeTestRequest(t *testing.T, socketPath string, version int, lookupKey, ex ...@@ -93,16 +93,6 @@ func makeTestRequest(t *testing.T, socketPath string, version int, lookupKey, ex
t.Fatalf("error writing HELLO: %v", err) t.Fatalf("error writing HELLO: %v", err)
} }
if version > 2 {
resp, err := conn.ReadLine()
if err != nil {
t.Fatalf("error reading HELLO response: %v", err)
}
if resp[0] != 'O' {
t.Fatalf("request returned unexpected status: %s", resp)
}
}
if err := conn.PrintfLine("L%s", lookupKey); err != nil { if err := conn.PrintfLine("L%s", lookupKey); err != nil {
t.Fatalf("error writing LOOKUP: %v", err) t.Fatalf("error writing LOOKUP: %v", err)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment