catch unexpected EOF in IMAP client

svn: r4392
This commit is contained in:
Matthew Flatt 2006-09-20 02:14:58 +00:00
parent 6123da54c0
commit c7fb924982

View File

@ -150,6 +150,8 @@
(let ([l (read-bytes-line r eol)])
(log "raw-reply: ~s~n" l)
(cond
[(eof-object? l)
(error 'imap-send "unexpected end-of-file from server")]
[(and id (starts-with? l id))
(let ([reply (imap-read (skip l id) r)])
(log "response: ~a~n" reply)