On 2006-07-16, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> If the server has closed the connection, then a recv() on the >> socket will return an empty string "", and a send() on the >> socket will raise an exception.
> like this ? > databack = aeris_sockobj.recv(2048) > if databack: > view_msg = 'caught request acknowlage %s bytes \n' % > len(databack) > else: > view_msg = 'fail to recieve data from aeris server\n' > > then put the reconnect in the else: block ? Yes, if the problem is that the host closes the connection, that should work. Modulo the broken indentation and line-wrapping. ;) -- Grant Edwards grante Yow! My mind is a potato at field... visi.com -- http://mail.python.org/mailman/listinfo/python-list