Subject: client detection of dead stream?

From: Mike Macgirvin <[email-masked]>
Date: Thu, 20 Oct 1994 20:46:04 -0700

Any way for a c-client client to figure out whether or not it's
dealing with a dead stream, so as to take some appropriate action?

It appears that 

	handle = mail_makehandle(ms); 

called immediately after open, and then 

	if((mail_stream(handle)) == NIL)  /* it's gone */

called at check time (and/or other convenient access points) would do
it. Is this in fact the best way, or are there any other methods I
should consider?

mike

---

From: Mark Crispin <[email-masked]>
Date: Thu, 20 Oct 1994 21:19:17 -0700 (PDT)

Mike -

The preferred method to see if a stream is still viable is to check the return
value from mail_ping() which I hope you are using at ``check time'' instead of
mail_check().  mail_check() is ``checkpoint'', not ``check for new mail''.

Using mail_makehandle()/mail_stream() as you suggest will tell you if you have
called mail_close() on that stream (e.g. in another thread or object), but it
won't tell you if an IMAP connection died.

-- Mark --