Skip to content

Commit 2b522e0

Browse files
committed
PQCancel returns 0 on error. Fixes #40.
1 parent ba39bd7 commit 2b522e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/postgresql_stubs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,8 +1128,8 @@ CAMLprim value PQCancel_stub(value v_conn)
11281128
caml_enter_blocking_section();
11291129
res = PQcancel(cancel, errbuf, 256);
11301130
caml_leave_blocking_section();
1131-
if (res == 0) CAMLreturn(v_None);
1132-
else CAMLreturn(make_some(caml_copy_string(errbuf)));
1131+
if (res == 0) CAMLreturn(make_some(caml_copy_string(errbuf)));
1132+
else CAMLreturn(v_None);
11331133
}
11341134
}
11351135

0 commit comments

Comments
 (0)