Use PG_EVENT_WRITE status for PgSQL

pull/4921/head
Rahim Kanji 1 year ago
parent 4969bd8301
commit d113bcb193

@ -349,8 +349,13 @@ void Base_Thread::configure_pollout(DS * myds, unsigned int n) {
} else {
if (myds->DSS > STATE_MARIADB_BEGIN && myds->DSS < STATE_MARIADB_END) {
thr->mypolls.fds[n].events = POLLIN;
if (thr->mypolls.myds[n]->myconn->async_exit_status & MYSQL_WAIT_WRITE)
thr->mypolls.fds[n].events |= POLLOUT;
if constexpr (std::is_same_v<T, PgSQL_Thread>) {
if (thr->mypolls.myds[n]->myconn->async_exit_status & PG_EVENT_WRITE)
thr->mypolls.fds[n].events |= POLLOUT;
} else if constexpr (std::is_same_v<T, MySQL_Thread>) {
if (thr->mypolls.myds[n]->myconn->async_exit_status & MYSQL_WAIT_WRITE)
thr->mypolls.fds[n].events |= POLLOUT;
}
} else {
myds->set_pollout();
}

Loading…
Cancel
Save