Skip to content

Conversation

@Blear
Copy link
Contributor

@Blear Blear commented Sep 27, 2022

fix assumedNextTaggedLine bug
The session expiration error returned by the done command is not captured correctly, resulting in laravel command mode not receiving new emails after some time.

fix assumedNextTaggedLine bug
@Blear Blear changed the title Update ImapProtocol.php fix assumedNextTaggedLine bug Sep 27, 2022
@Blear
Copy link
Contributor Author

Blear commented Sep 27, 2022

>> TAG322 IDLE << + idling >> DONE << TAG322 OK IDLE terminated (Success) >> TAG323 IDLE << + idling >> DONE << * BYE Session expired, please login again. (Unable to catch this error) 
public function done(): bool { $this->write("DONE"); if (!$this->assumedNextTaggedLine('OK', $tags)) { throw new RuntimeException('done failed'); } return true; } protected function assumedNextTaggedLine(string $start, &$tag): bool { $line = $this->nextTaggedLine($tag); return strpos($line, $start) >= 0;//strpos($line, $start) !==false }
@Webklex
Copy link
Owner

Webklex commented Oct 17, 2022

Hi @Blear ,
thank you! :)

Best regards,

@Webklex Webklex merged commit 68eaf30 into Webklex:master Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants