Permalink
Browse files

Add additional check during initial pass at connecting

  • Loading branch information...
1 parent 6ccab6f commit eca57a28af2f9e5c10272f5d1885416755321e18 @mscdex committed Oct 31, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/binding.cc
View
2 src/binding.cc
@@ -297,6 +297,8 @@ class Client : public ObjectWrap {
config.port,
NULL,
config.client_opts);
+ if (!mysql_ret)
+ return emit_error(err_symbol, true);
mysql_sock = mysql_get_socket(&mysql);
poll_handle = (uv_poll_t*) malloc(sizeof(uv_poll_t));
uv_poll_init_socket(uv_default_loop(), poll_handle,

0 comments on commit eca57a2

Please sign in to comment.