How can a thread be closed within a for-loop ?
I am trying to create a push-stream HTTP / 2 resource in a loop while reading a .json configuration file. If there is only one resource in resurce.file,type , clicking will succeed. If there is more than one resource in the configuration, only the first specified resource is transferred, and the remaining resource is not pushed, and the client never receives the remaining files and does not complete the parsing.
I think that only the first resource stream ends, and the remaining open threads do not close.
I commented the way I think the code should function:
.config.json5:
resource: [ // HTTP/2 Push-Streams { file: '/js/theme.min.js', type: 'script' }, { file: '/css/theme.min.css', type: 'style', url: '/' } ]
Using the example above
If /js/theme.min.js specified first and /css/theme.min.css specified in seconds in the configuration, /js/theme.min.js will be downloaded by the browser, and the other file will not be downloaded and the client will freeze (not parsing continues). If the order of the resource lists is exchanged, the same thing happens. If there is only one file in the configuration, everything works as expected.
Any help would be greatly appreciated.
source share