diff --git a/main/http.c b/main/http.c
index b6b2abe29e09135ee76f5d507ed8466afa987f7f..6c604f1013ab5b98bd7302f41c5a046d2755d94a 100644
--- a/main/http.c
+++ b/main/http.c
@@ -634,9 +634,7 @@ static void *httpd_helper_thread(void *data)
 		free(title);
 
 done:
-	if (ser->f)
-		fclose(ser->f);
-	close(ser->fd);
+	fclose(ser->f);
 	free(ser);
 	return NULL;
 }