Skip to content

Commit

Permalink
Merge branch '0.2.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
brianmario committed Nov 9, 2011
2 parents ebe7c1d + 8f8c947 commit 10bebe4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ext/mysql2/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,10 @@ static VALUE rb_mysql_client_query(int argc, VALUE * argv, VALUE self) {
}

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

#ifndef _WIN32
rb_rescue2(do_send_query, (VALUE)&args, disconnect_and_raise, self, rb_eException, (VALUE)0);

if (!async) {
async_args.fd = wrapper->client->net.fd;
async_args.self = self;
Expand All @@ -474,6 +475,8 @@ static VALUE rb_mysql_client_query(int argc, VALUE * argv, VALUE self) {
return Qnil;
}
#else
do_send_query(&args);

// this will just block until the result is ready
return rb_ensure(rb_mysql_client_async_result, self, finish_and_mark_inactive, self);
#endif
Expand Down

0 comments on commit 10bebe4

Please sign in to comment.