summaryrefslogtreecommitdiff
path: root/sql/handle_connections_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/handle_connections_win.cc')
-rw-r--r--sql/handle_connections_win.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/handle_connections_win.cc b/sql/handle_connections_win.cc
index 0046dcdfd8c..5db10c2fada 100644
--- a/sql/handle_connections_win.cc
+++ b/sql/handle_connections_win.cc
@@ -368,17 +368,14 @@ struct Pipe_Listener : public Listener
static void create_pipe_connection(HANDLE pipe)
{
- CONNECT *connect;
- if (!(connect= new CONNECT) || !(connect->vio= vio_new_win32pipe(pipe)))
+ if (auto connect= new CONNECT(pipe))
+ create_new_thread(connect);
+ else
{
CloseHandle(pipe);
- delete connect;
statistic_increment(aborted_connects, &LOCK_status);
statistic_increment(connection_errors_internal, &LOCK_status);
- return;
}
- connect->host= my_localhost;
- create_new_thread(connect);
}
/* Threadpool callback.*/