Fix a busy loop bug when connections to mysql server are timeout (#286)

This commit is contained in:
An Tao 2019-10-21 19:10:59 +08:00 committed by GitHub
parent e7b6ba27bb
commit 4868aa964d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -211,7 +211,7 @@ void MysqlConnection::handleEvent()
if (revents & POLLPRI)
status |= MYSQL_WAIT_EXCEPT;
status = (status & _waitStatus);
if (status == 0)
if (status == 0 && _waitStatus != 0)
return;
MYSQL *ret;
if (_status == ConnectStatus_Connecting)