mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Fix regression introduced in 1afb4cbfa8 (#331)
				
					
				
			This commit is contained in:
		
							parent
							
								
									e6757d9a61
								
							
						
					
					
						commit
						e276c0a278
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		|  | @ -10,7 +10,7 @@ module Kemal | ||||||
|   # Overload of self.run with the default startup logging |   # Overload of self.run with the default startup logging | ||||||
|   def self.run(port = nil) |   def self.run(port = nil) | ||||||
|     self.run port do |     self.run port do | ||||||
|       log "[#{config.env}] Kemal is ready to lead at #{config.scheme}://#{config.host_binding}:#{config.port}\n" |       log "[#{config.env}] Kemal is ready to lead at #{config.scheme}://#{config.host_binding}:#{config.port}" | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|  | @ -42,7 +42,7 @@ module Kemal | ||||||
|     # Test environment doesn't need to have signal trap, built-in images, and logging. |     # Test environment doesn't need to have signal trap, built-in images, and logging. | ||||||
|     unless config.env == "test" |     unless config.env == "test" | ||||||
|       Signal::INT.trap { |       Signal::INT.trap { | ||||||
|         log "Kemal is going to take a rest!\n" if config.shutdown_message |         log "Kemal is going to take a rest!" if config.shutdown_message | ||||||
|         Kemal.stop |         Kemal.stop | ||||||
|         exit |         exit | ||||||
|       } |       } | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ module Kemal | ||||||
|       rescue ex : Kemal::Exceptions::CustomException |       rescue ex : Kemal::Exceptions::CustomException | ||||||
|         call_exception_with_status_code(context, ex, context.response.status_code) |         call_exception_with_status_code(context, ex, context.response.status_code) | ||||||
|       rescue ex : Exception |       rescue ex : Exception | ||||||
|         log("Exception: #{ex.inspect_with_backtrace}\n") |         log("Exception: #{ex.inspect_with_backtrace}") | ||||||
|         return call_exception_with_status_code(context, ex, 500) if Kemal.config.error_handlers.has_key?(500) |         return call_exception_with_status_code(context, ex, 500) if Kemal.config.error_handlers.has_key?(500) | ||||||
|         verbosity = Kemal.config.env == "production" ? false : true |         verbosity = Kemal.config.env == "production" ? false : true | ||||||
|         return render_500(context, ex.inspect_with_backtrace, verbosity) |         return render_500(context, ex.inspect_with_backtrace, verbosity) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue