gRPC collapsing in while(1)

Hi all,

anyone else expierencing an issue with the backend gRPC socket closing mid code run?
I have the following code in a while(1)

            async for pos_vel in drone.conn.telemetry.position_velocity_ned():

                s[0] = pos_vel.position.north_m
                s[1] = pos_vel.position.east_m
                s[2] = -pos_vel.position.down_m
                s[3] = pos_vel.velocity.north_m_s
                s[4] = pos_vel.velocity.east_m_s
                s[5] = -pos_vel.velocity.down_m_s           # TODO: should this be negative? velocity encodes direction...
                break
            asyncio.sleep(0.1)
            # # # print("loop 2")
            async for quat in drone.conn.telemetry.attitude_quaternion():
                s[6] = quat.w
                s[7] = quat.x
                s[8] = quat.y
                s[9] = quat.z
                break
            asyncio.sleep(0.1)
            # # print("loop 3")
            async for rate in drone.conn.telemetry.attitude_angular_velocity_body():
                # loop = 1
                s[10] = rate.roll_rad_s
                s[11] = rate.pitch_rad_s
                s[12] = rate.yaw_rad_s
                    # print("loop 3")
                break
           some math i removed
           await drone.conn.offboard.set_attitude_rate(AttitudeRate(0.0, 0.0, 0.0, 0.5))

and I routinely catch a

    await drone.conn.offboard.set_attitude_rate(AttitudeRate(0.0, 0.0, 0.0, 0.5))
  File "/home/jules/MAVSDK-Python/mavsdk/offboard.py", line 1127, in set_attitude_rate
    response = await self._stub.SetAttitudeRate(request)
  File "/home/jules/.local/lib/python3.6/site-packages/aiogrpc/channel.py", line 40, in __call__
    return await fut
grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with:
	status = StatusCode.UNAVAILABLE
	details = "Connection reset by peer"
	debug_error_string = "{"created":"@1596660436.517915952","description":"Error received from peer ipv6:[::1]:48119","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"Connection reset by peer","grpc_status":14}"
>

putting in some sleeps help but maybe I am approaching this issue wrong.

Also if I comment the last for loop out
async for rate in drone.conn.telemetry.attitude_angular_velocity_body():
The code runs fine.