Re: Hang up reading Yandex mail box listing.
Viacheslav Chimishuk <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <[email protected]> |
After some further investigation I've found a next thing happens in getmail's POP3RetrieverBase(RetrieverSkeleton).initialize() method: 0. RetrieverSkeleton.initialize() is called. socket.setdefaulttimeout() is set. 1. self._connect() is called, which is actually Py24POP3SSLinitMixIn._connect() in the mixin's _connect() the socket is created with default timeout set on the step 0. 2. self.conn.sock.setblocking(1) is called this is the place where timeout is set to None for the socket 3. all the rest code uses conn.sock with None timeout. Looks like this is it -- the bug we are looking for. Charles, what do you think? What is the purpose of setblocking(1) call here? On 11.07.2019 20:00, Viacheslav Chimishuk <[email protected]> wrote: > On 10.07.2019 15:18, Charles Cazabon <[email protected]> wrote: > > Viacheslav Chimishuk <[email protected]> wrote: > > > I've checked: gettimeout() returns None inside SSLSocket.read(). > > > > Something (besides getmail) is resetting it, then. If you look in > > _retrieverbases.py, line 965, if timeout is set in your retriever config > > (including using the default 180), then it sets the socket default timeout to > > that value. > > > > Maybe this is related to the old incompatibility between ssl and timeouts in > > Python; I'm not sure. > > I see now the problem. I'll try to dig some more into that direction. > Thank you, for helping. > > -- > Best regards, Viacheslav Chimishuk > [email protected] > Ukraine, Khmelnitsky > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] -- Best regards, Viacheslav Chimishuk [email protected] Ukraine, Khmelnitsky