diff options
Diffstat (limited to 'rpc/rpc-transport/socket/src/socket.c')
| -rw-r--r-- | rpc/rpc-transport/socket/src/socket.c | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index e969186b2f3..a336751b589 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -3143,11 +3143,13 @@ err:                  arg->this = THIS;                  arg->trans = this;                  arg->refd = refd; -                th_ret = pthread_create (&th_id, NULL, socket_connect_error_cbk, -                                         arg); +                th_ret = gf_thread_create_detached (&th_id, +                                                    socket_connect_error_cbk, +                                                    arg);                  if (th_ret) { -                       gf_log (this->name, GF_LOG_ERROR, "pthread_create" -                               "failed: %s", strerror(errno)); +                        /* Error will be logged by gf_thread_create_attached */ +                        gf_log (this->name, GF_LOG_ERROR, "Thread creation " +                               "failed");                          GF_FREE (arg);                          GF_ASSERT (0);                  }  | 
