title: setTimeout with async/await not running as expected
body: <p>I am trying to automatically refresh a token using setTimeout.
  Due to some reasons I am not using setInterval . Here's the code snippet: </p>
  
  <pre><code>let token = '';
  let expire = '';
  const getToken = async () =&gt; {
  
      const options = { /* some valid options that gets token */}
  
      try {
          expire = jwtDecode(token).exp * 1000 - Math.floor(new Date().getTime()) - HOUR
          if (expire &gt; HOUR) return expire
      } catch (err) {
          console.log("Err, proceeding to next.")
      }
  
  
      try {
          const response = await rp(options) //using request-promise
          token = JSON.parse(response).access_token
      } catch (err) {
          //retry logic in N minutes
      }
  
      setTimeout(async () =&gt; {
          await getToken();
      }, expire)
  
      return expire;
  }
  </code></pre>
  
  <p>The idea is to let the code fail on first run, which should then automatically make a request for a token. It then sets the expiry time for the next refresh round.</p>
  
  <p>I tested it with smaller <code>expire</code> like 1000, 5000..etc, and they seemed to work fine.
  However our server was down today, and we found out the token was not refreshed. Any hints would be appreciated.</p>
  
  <p>Edit: typo in code</p>