Update connection state.