Minor improvement in received packet handling

Assert that the previously received packet was handled.
The connection code is still unfinished: it doesn't actually verify that
the response to the connection request indicates a successful
connection.