mirror of
				https://github.com/zyphlar/doorlock.git
				synced 2024-04-03 21:36:03 +00:00 
			
		
		
		
	let the door-open return fast
This commit is contained in:
		
							parent
							
								
									fcd9545890
								
							
						
					
					
						commit
						bee518e1ef
					
				@ -7,12 +7,12 @@ module.exports = class Door {
 | 
			
		||||
    return new Promise(success => {
 | 
			
		||||
      console.log('OPEN DOOR!')
 | 
			
		||||
      const board = new Board(2)
 | 
			
		||||
      success(board.allOn())
 | 
			
		||||
      setTimeout(() => {
 | 
			
		||||
        console.log('CLOSING DOOR!')
 | 
			
		||||
        board.allOff()
 | 
			
		||||
        success()
 | 
			
		||||
      }, DELAY)
 | 
			
		||||
      return board.allOn()
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user