Ignore both EOF possibilities
This commit is contained in:
		
							parent
							
								
									7f50ff1f92
								
							
						
					
					
						commit
						a2df979e66
					
				
							
								
								
									
										2
									
								
								http.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								http.go
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -86,7 +86,7 @@ func (rt *Router) routeServerPower(w http.ResponseWriter, r *http.Request, ps ht
 | 
			
		|||
	if err := dec.Decode(&action); err != nil {
 | 
			
		||||
		// Don't flood the logs with error messages if someone sends through bad
 | 
			
		||||
		// JSON data. We don't really care.
 | 
			
		||||
		if err != io.EOF {
 | 
			
		||||
		if err != io.EOF && err != io.ErrUnexpectedEOF {
 | 
			
		||||
			zap.S().Errorw("failed to decode power action", zap.Error(err))
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user