spray/spray — pull request #682 by sirthias (2013-11-12 10:47:48+00:00)
Title: = io: fix IllegalStateException in SslTlsSupport, closes #667

The issue appears to have been triggered by specific packet splitting in the closing sequence.
Apparently it can happen that the incoming bytes triggering an "outbound done" come after the incoming bytes that still produce outgoing bytes, i.e. the SSLEngine can process incoming bytes and switch to "outbound done" even without having produced outgoing bytes at the same time. This patch handles this case.