Skip to content

Commit 18cc40e

Browse files
committed
[fix] fix a bug when macro NGX_RTMP_POOL_DEBUG is on.
1 parent fe2efdf commit 18cc40e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ngx_rtmp_stat_module.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,10 @@ ngx_rtmp_stat_server(ngx_http_request_t *r, ngx_chain_t ***lll,
10651065
NGX_RTMP_STAT_L("<server>\r\n");
10661066
}
10671067

1068+
if (slcf->format & NGX_RTMP_STAT_FORMAT_JSON) {
1069+
NGX_RTMP_STAT_L("{");
1070+
}
1071+
10681072
#ifdef NGX_RTMP_POOL_DEBUG
10691073
ngx_rtmp_stat_dump_pool(r, lll, cscf->pool);
10701074
if (slcf->format & NGX_RTMP_STAT_FORMAT_JSON) {
@@ -1073,7 +1077,7 @@ ngx_rtmp_stat_server(ngx_http_request_t *r, ngx_chain_t ***lll,
10731077
#endif
10741078

10751079
if (slcf->format & NGX_RTMP_STAT_FORMAT_JSON) {
1076-
NGX_RTMP_STAT_L("{\"applications\":[");
1080+
NGX_RTMP_STAT_L("\"applications\":[");
10771081
}
10781082

10791083
cacf = cscf->applications.elts;

0 commit comments

Comments
 (0)