Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.

Commit dbab4b1

Browse files
committed
Fix wrong return value detection
1 parent bd8272a commit dbab4b1

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed
File renamed without changes.

swoole_postgresql_coro.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ static bool swoole_pgsql_wait_write_ready(PGconn *pgsql, pg_object *object, zval
761761
};
762762

763763
while ((retval = PQflush(pgsql)) == 1) {
764-
if (!object->socket->isset_writable_event() && !swoole_event_add(object->socket, SW_EVENT_WRITE)) {
764+
if (!object->socket->isset_writable_event() && swoole_event_add(object->socket, SW_EVENT_WRITE) == SW_ERR) {
765765
return false;
766766
}
767767
object->co->yield_ex(object->timeout);

0 commit comments

Comments
 (0)