Ignore server comments
This commit is contained in:
parent
71b60dbb3a
commit
391caf042a
1 changed files with 6 additions and 0 deletions
|
|
@ -359,10 +359,16 @@ impl<T: Read + Write> Client<T> {
|
||||||
// TODO Clean up this code
|
// TODO Clean up this code
|
||||||
loop {
|
loop {
|
||||||
let mut line = Vec::new();
|
let mut line = Vec::new();
|
||||||
|
|
||||||
// explicit match blocks neccessary to convert error to tuple and not bind self too
|
// explicit match blocks neccessary to convert error to tuple and not bind self too
|
||||||
// early (see also comment on `login`)
|
// early (see also comment on `login`)
|
||||||
ok_or_unauth_client_err!(self.readline(&mut line), self);
|
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`.
|
// Some servers will only send `+\r\n`.
|
||||||
if line.starts_with(b"+ ") || &line == b"+\r\n" {
|
if line.starts_with(b"+ ") || &line == b"+\r\n" {
|
||||||
let challenge = if &line == b"+\r\n" {
|
let challenge = if &line == b"+\r\n" {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue