summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/multipart-replace-http-server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/multipart-replace-http-server.c b/src/multipart-replace-http-server.c
index 792a26d..faec814 100644
--- a/src/multipart-replace-http-server.c
+++ b/src/multipart-replace-http-server.c
@@ -201,8 +201,11 @@ void connection_handler(int fd) {
}
void *connection_thread(void *arg_anon) {
- pthread_setname_np(pthread_self(), "connection");
int fd = (int)(intptr_t)arg_anon;
+
+ char name[16];
+ snprintf(name, sizeof(name), "connection %d", fd);
+ pthread_setname_np(pthread_self(), name);
log("Connection %d opened", fd);
connection_handler(fd);
log("Connection %d closed", fd);