Merge pull request #154 from dmeijboom/master
When authenticating using SASL XAUTH2 with Gmail fails
This commit is contained in:
commit
3ee0952723
1 changed files with 6 additions and 0 deletions
|
|
@ -359,10 +359,16 @@ impl<T: Read + Write> Client<T> {
|
|||
// TODO Clean up this code
|
||||
loop {
|
||||
let mut line = Vec::new();
|
||||
|
||||
// explicit match blocks neccessary to convert error to tuple and not bind self too
|
||||
// early (see also comment on `login`)
|
||||
ok_or_unauth_client_err!(self.readline(&mut line), self);
|
||||
|
||||
// ignore server comments
|
||||
if line.starts_with(b"* ") {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Some servers will only send `+\r\n`.
|
||||
if line.starts_with(b"+ ") || &line == b"+\r\n" {
|
||||
let challenge = if &line == b"+\r\n" {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue