Skip to content

Commit 31b39c1

Browse files
committed
Moved incorrect Int_val out of blocking section
1 parent 177cc25 commit 31b39c1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/postgresql_stubs.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1583,7 +1583,6 @@ CAMLprim intnat lo_lseek_stub(value v_conn, intnat fd, intnat pos,
15831583
PGconn *conn = get_conn(v_conn);
15841584
intnat res;
15851585
int whence;
1586-
caml_enter_blocking_section();
15871586
switch (Int_val(v_whence)) {
15881587
case 0:
15891588
whence = SEEK_SET;
@@ -1595,6 +1594,7 @@ CAMLprim intnat lo_lseek_stub(value v_conn, intnat fd, intnat pos,
15951594
whence = SEEK_END;
15961595
break;
15971596
}
1597+
caml_enter_blocking_section();
15981598
res = lo_lseek(conn, fd, pos, whence);
15991599
caml_leave_blocking_section();
16001600
CAMLreturn(res);

0 commit comments

Comments
 (0)