Skip to content

Commit 10bebe4

Browse files
committed
Merge branch '0.2.x'
2 parents ebe7c1d + 8f8c947 commit 10bebe4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/mysql2/client.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,10 @@ static VALUE rb_mysql_client_query(int argc, VALUE * argv, VALUE self) {
460460
}
461461

462462
args.wrapper = wrapper;
463-
rb_rescue2(do_send_query, (VALUE)&args, disconnect_and_raise, self, rb_eException, (VALUE)0);
464463

465464
#ifndef _WIN32
465+
rb_rescue2(do_send_query, (VALUE)&args, disconnect_and_raise, self, rb_eException, (VALUE)0);
466+
466467
if (!async) {
467468
async_args.fd = wrapper->client->net.fd;
468469
async_args.self = self;
@@ -474,6 +475,8 @@ static VALUE rb_mysql_client_query(int argc, VALUE * argv, VALUE self) {
474475
return Qnil;
475476
}
476477
#else
478+
do_send_query(&args);
479+
477480
// this will just block until the result is ready
478481
return rb_ensure(rb_mysql_client_async_result, self, finish_and_mark_inactive, self);
479482
#endif

0 commit comments

Comments
 (0)