Browse Source

Fix segmentation fault on SASL failed

Shin'ya Ueoka 9 years ago
parent
commit
a5a578733f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      broker.go

+ 1 - 1
broker.go

@@ -566,7 +566,7 @@ func (b *Broker) sendAndReceiveSASLPlainHandshake() error {
 		return err
 		return err
 	}
 	}
 	if res.Err != ErrNoError {
 	if res.Err != ErrNoError {
-		Logger.Printf("Invalid SASL Mechanism : %s\n", err.Error())
+		Logger.Printf("Invalid SASL Mechanism : %s\n", res.Err.Error())
 		return res.Err
 		return res.Err
 	}
 	}
 	Logger.Print("Successful SASL handshake")
 	Logger.Print("Successful SASL handshake")