Browse Source

backward compatibility

Darien Raymond 7 years ago
parent
commit
dde06289bb
1 changed files with 1 additions and 2 deletions
  1. 1 2
      proxy/dokodemo/dokodemo.go

+ 1 - 2
proxy/dokodemo/dokodemo.go

@@ -68,8 +68,7 @@ func (d *DokodemoDoor) Process(ctx context.Context, network net.Network, conn in
 	if d.config.FollowRedirect {
 	if d.config.FollowRedirect {
 		if origDest, ok := proxy.OriginalTargetFromContext(ctx); ok {
 		if origDest, ok := proxy.OriginalTargetFromContext(ctx); ok {
 			dest = origDest
 			dest = origDest
-		}
-		if handshake, ok := conn.(hasHandshakeAddress); ok {
+		} else if handshake, ok := conn.(hasHandshakeAddress); ok {
 			addr := handshake.HandshakeAddress()
 			addr := handshake.HandshakeAddress()
 			if addr != nil {
 			if addr != nil {
 				dest.Address = addr
 				dest.Address = addr