mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	fix: stop interval if error occurs
This commit is contained in:
		
							parent
							
								
									f6aaf85cca
								
							
						
					
					
						commit
						9261253b63
					
				
							
								
								
									
										4
									
								
								lua.go
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								lua.go
									
									
									
									
									
								
							@ -201,8 +201,8 @@ func hshinterval(L *lua.LState) int {
 | 
			
		||||
					NRet: 0,
 | 
			
		||||
					Protect: true,
 | 
			
		||||
				}); err != nil {
 | 
			
		||||
					fmt.Fprintln(os.Stderr,
 | 
			
		||||
						"Error in interval function:\n\n", err)
 | 
			
		||||
					fmt.Fprintln(os.Stderr, "Error in interval function:\n\n", err)
 | 
			
		||||
					stop <- lua.LTrue // stop the interval
 | 
			
		||||
				}
 | 
			
		||||
			case <-stop:
 | 
			
		||||
				ticker.Stop()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user