Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > ssl and timeout issue

Reply
Thread Tools

ssl and timeout issue

 
 
=?ISO-8859-15?Q?Tarek_Ziad=E9?=
Guest
Posts: n/a
 
      10-19-2005
Hello,

I cannot manage to use socket timeouts with an imap ssl connector,and i
badly *need* it :'(

I have already mentionned it here:
http://archives.free.net.ph/message/...390efe.en.html

Does anyone have a solution ?

(I thought of coding my own threaded timer over the ssl socket, but...)


Tarek

Traceback:

>>> from imaplib import IMAP4_SSL, IMAP4_SSL_PORT
>>> import socket
>>> test = IMAP4_SSL('mail.xxxx.com', 993)
>>> test.sock.settimeout(10)
>>> test.login('xxx@xxx', 'password')

Traceback (most recent call last):
File "<stdin>", line 1, *in* ?
File "/usr/lib/python2.4/imaplib.py", line 480, *in* login
typ, dat = self._simple_command('LOGIN', user, self._quote(password))
File "/usr/lib/python2.4/imaplib.py", line 1028, *in* _simple_command
*return* self._command_complete(name, self._command(name, *args))
File "/usr/lib/python2.4/imaplib.py", line 858, *in* _command_complete
typ, data = self._get_tagged_response(tag)
File "/usr/lib/python2.4/imaplib.py", line 959, *in* _get_tagged_response
self._get_response()
File "/usr/lib/python2.4/imaplib.py", line 876, *in* _get_response
resp = self._get_line()
File "/usr/lib/python2.4/imaplib.py", line 969, *in* _get_line
line = self.readline()
File "/usr/lib/python2.4/imaplib.py", line 1135, *in* readline
char = self.sslobj.read(1)
socket.sslerror: The read operation timed out
>>> test = IMAP4_SSL('mail.xxxx.com', 993)
>>> test.login('xxx@xxx', 'password')

('OK', ['LOGIN Ok.'])

--
Tarek Ziadé | Nuxeo R&D (Paris, France)
CPS Plateform : http://www.cps-project.org
mail: tziade at nuxeo.com | tel: +33 (0) 6 30 37 02 63
You need Zope 3 - http://www.z3lab.org/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SSL and OpenSSL::SSL::SSLServer accept() born in USSR Ruby 2 09-27-2009 01:46 AM
Maintain session between an SSL page and Non SSL page John Smith Java 0 10-05-2006 12:03 PM
webrick, ssl and non-ssl on the same port Pavel Smerk Ruby 3 08-15-2006 05:51 PM
Timeout::timeout and Socket timeout Mark Probert Ruby 1 10-06-2004 09:30 AM
web.config session timeout and forms authentication timeout Do ASP .Net 2 11-23-2003 02:27 PM



Advertisments