mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Use replace instead of each for replacing handlers
This commit is contained in:
		
							parent
							
								
									62946fd987
								
							
						
					
					
						commit
						ce024ba748
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -62,7 +62,7 @@ module Kemal | ||||||
| 
 | 
 | ||||||
|     def handlers=(handlers : Array(HTTP::Handler)) |     def handlers=(handlers : Array(HTTP::Handler)) | ||||||
|       clear |       clear | ||||||
|       handlers.each { |handler| HANDLERS << handler } |       HANDLERS.replace(handlers) | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|     def add_handler(handler : HTTP::Handler | HTTP::WebSocketHandler, position = Kemal.config.custom_handler_position) |     def add_handler(handler : HTTP::Handler | HTTP::WebSocketHandler, position = Kemal.config.custom_handler_position) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue