Skip to content

Commit 0a92aa3

Browse files
committed
Decode and DecodeTyped one way
1 parent 32cdc4c commit 0a92aa3

File tree

2 files changed

+317
-260
lines changed

2 files changed

+317
-260
lines changed

dial.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,14 @@ func identify(w writeFlusher, r io.Reader) (ProtocolInfo, error) {
400400

401401
resp, err := readResponse(r)
402402
if err != nil {
403-
if iproto.Error(resp.Header().Code) == iproto.ER_UNKNOWN_REQUEST_TYPE {
404-
// IPROTO_ID requests are not supported by server.
405-
return info, nil
406-
}
407403
return info, err
408404
}
409405
data, err := resp.Decode()
410406
if err != nil {
407+
if iproto.Error(resp.Header().Code) == iproto.ER_UNKNOWN_REQUEST_TYPE {
408+
// IPROTO_ID requests are not supported by server.
409+
return info, nil
410+
}
411411
return info, err
412412
}
413413

0 commit comments

Comments
 (0)