Skip to content

Commit 2af3303

Browse files
committed
Use nogvl_dbsqlok
1 parent 46b50ba commit 2af3303

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/tiny_tds/client.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,9 @@ static VALUE rb_tinytds_execute(VALUE self, VALUE sql) {
308308
// note that both of these operations are blocking as we do not have access to these
309309
// "NOGVL" methods from result.c
310310
if (cwrap->userdata->dbsqlok_sent == 0) {
311-
dbsqlok(cwrap->client);
311+
if(nogvl_dbsqlok(cwrap->client) != SUCCEED) {
312+
rb_raise(cTinyTdsError, "unable to acknowledge previous results with server");
313+
}
312314
}
313315

314316
dbcancel(cwrap->client);

0 commit comments

Comments
 (0)