Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-IDLE dosn't sends #42

Closed
unkernet opened this issue Dec 8, 2011 · 4 comments
Closed

re-IDLE dosn't sends #42

unkernet opened this issue Dec 8, 2011 · 4 comments

Comments

@unkernet
Copy link

unkernet commented Dec 8, 2011

I think you need to use setInterval instead of setTimeout

self._state.tmrKeepalive = setInterval(function() {
...
var sendBox = false;
clearInterval(self._state.tmrKeepalive);
@mscdex
Copy link
Owner

mscdex commented Dec 8, 2011

Can you produce a small test case that reproduces the issue?

@unkernet
Copy link
Author

unkernet commented Dec 9, 2011

setTimeout callback fires only once, when self._state.ext.idle.timeWaited < self._state.ext.idle.MAX_WAIT
The above solution is incomplete, I'm working on it now.

My debug log, you can see that there are no re-IDLEs, connection dies after several hours:

Fri Dec 09 2011 10:11:47 GMT+0400 (MSK)
<<SENT>>: IDLE IDLE

Fri Dec 09 2011 10:11:47 GMT+0400 (MSK)
<<RECEIVED>>: '+ idling\r\n'

Fri Dec 09 2011 10:16:53 GMT+0400 (MSK)
<<RECEIVED>>: '* 3 EXISTS\r\n'

Fri Dec 09 2011 10:21:59 GMT+0400 (MSK)
<<RECEIVED>>: '* 3 EXISTS\r\n'

Fri Dec 09 2011 10:26:59 GMT+0400 (MSK)
<<RECEIVED>>: '* 3 EXISTS\r\n'

Fri Dec 09 2011 10:32:04 GMT+0400 (MSK)
<<RECEIVED>>: '* 3 EXISTS\r\n'

Fri Dec 09 2011 10:37:09 GMT+0400 (MSK)
<<RECEIVED>>: '* 3 EXISTS\r\n'

Fri Dec 09 2011 10:42:14 GMT+0400 (MSK)
<<RECEIVED>>: '* 3 EXISTS\r\n'

Fri Dec 09 2011 10:47:20 GMT+0400 (MSK)
<<RECEIVED>>: '* 3 EXISTS\r\n'

Fri Dec 09 2011 10:52:25 GMT+0400 (MSK)
<<RECEIVED>>: '* 3 EXISTS\r\n'

[...]

Fri Dec 09 2011 12:44:18 GMT+0400 (MSK)
<<RECEIVED>>: '* 3 EXISTS\r\n'

@unkernet
Copy link
Author

unkernet commented Dec 9, 2011

Fix need a lot of code changes, or just one noop :)

self._state.tmrKeepalive = setInterval(function() {
  if (self._state.isIdle) {
    if (self._state.ext.idle.sentIdle) {
      self._state.ext.idle.timeWaited += self._state.tmoKeepalive;
      if (self._state.ext.idle.timeWaited >= self._state.ext.idle.MAX_WAIT)
        self._noop(); // It causes re-IDLE
    } else
      self._noop();
  }
}, self._state.tmoKeepalive);

@mscdex
Copy link
Owner

mscdex commented Apr 27, 2012

@unkernet do you still experience this problem with 0.3.1?

@mscdex mscdex closed this as completed Jul 8, 2012
Jivings pushed a commit to squarecat/node-imap that referenced this issue Nov 6, 2019
feat(home): homepage padding different from subpage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants