Merge pull request #3984 from take-cheeze/merge_socket

Catch up with latest mruby-socket.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2018-03-25 22:25:15 +09:00
committed by GitHub
+4
View File
@@ -152,6 +152,10 @@ mrb_addrinfo_getaddrinfo(mrb_state *mrb, mrb_value klass)
hints.ai_protocol = (int)mrb_fixnum(protocol);
}
if (mrb_fixnum_p(protocol)) {
hints.ai_protocol = mrb_fixnum(protocol);
}
lastai = mrb_cv_get(mrb, klass, mrb_intern_lit(mrb, "_lastai"));
if (mrb_cptr_p(lastai)) {
freeaddrinfo((struct addrinfo*)mrb_cptr(lastai));