Create threads with a 32 KB stack rather than what happens to be the default.
[libradsec.git] / tls.c
diff --git a/tls.c b/tls.c
index 084c0ce..d60d59b 100644 (file)
--- a/tls.c
+++ b/tls.c
@@ -339,7 +339,7 @@ void tlsserverrd(struct client *client) {
 
     debug(DBG_DBG, "tlsserverrd: starting for %s", addr2string(client->addr));
 
-    if (pthread_create(&tlsserverwrth, NULL, tlsserverwr, (void *)client)) {
+    if (pthread_create(&tlsserverwrth, &pthread_attr, tlsserverwr, (void *)client)) {
        debug(DBG_ERR, "tlsserverrd: pthread_create failed");
        return;
     }
@@ -460,7 +460,7 @@ void *tlslistener(void *arg) {
            debug(DBG_WARN, "accept failed");
            continue;
        }
-       if (pthread_create(&tlsserverth, NULL, tlsservernew, (void *)&s)) {
+       if (pthread_create(&tlsserverth, &pthread_attr, tlsservernew, (void *)&s)) {
            debug(DBG_ERR, "tlslistener: pthread_create failed");
            shutdown(s, SHUT_RDWR);
            close(s);