mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-03 19:17:29 -05:00 
			
		
		
		
	gzip: cleaned up writer pool initialization code (#1695)
This commit is contained in:
		
							parent
							
								
									20a047f7e1
								
							
						
					
					
						commit
						baf269d4e2
					
				@ -146,11 +146,7 @@ func initWriterPool() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// add default writer pool
 | 
						// add default writer pool
 | 
				
			||||||
	defaultWriterPoolIndex = i
 | 
						defaultWriterPoolIndex = i
 | 
				
			||||||
	writerPool[defaultWriterPoolIndex] = &sync.Pool{
 | 
						writerPool[defaultWriterPoolIndex] = newWriterPool(gzip.DefaultCompression)
 | 
				
			||||||
		New: func() interface{} {
 | 
					 | 
				
			||||||
			return gzip.NewWriter(ioutil.Discard)
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func getWriter(level int) *gzip.Writer {
 | 
					func getWriter(level int) *gzip.Writer {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user