catch unexpected EOF in IMAP client

svn: r4392

original commit: c7fb924982784c6e5b12c47e6158eee2e1a880b7
This commit is contained in:
Matthew Flatt 2006-09-20 02:14:58 +00:00
parent e22cfb2f10
commit f4e29064e5

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)