Commit 4b54bd0d authored by Niels Möller's avatar Niels Möller
Browse files

(do_read_packet): If we get EOF on a packet

boundary, raise EXC_FINISH_READ, not EXC_PROTOCOL.

Rev: src/read_packet.c:1.50
parent 841cbf33
......@@ -110,8 +110,16 @@ do_read_packet(struct read_handler **h,
if (!available)
{
debug("read_packet: EOF in state %i\n", closure->state);
EXCEPTION_RAISE(closure->connection->e,
make_protocol_exception(0, "Unexpected EOF"));
if (closure->state != WAIT_START)
EXCEPTION_RAISE(closure->connection->e,
make_protocol_exception(0, "Unexpected EOF"));
else
/* FIXME: This may still be "unexpected".
*
* We should check that there's no open channels. */
EXCEPTION_RAISE(closure->connection->e, &finish_read_exception);
*h = NULL;
return 0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment