Make sure the connect() method waits till the channel is fully connected.
Make sure we send ACKs before we try to commit them.