Fix PriorityQueue crash when protobuf messages are compared as tiebreakers
Python's heapq compares all tuple elements if earlier ones are equal.
Using timestamp as the second key means two rapidly queued messages at
the same millisecond trigger comparison of the protobuf message objects,
which don't support '<'. Replace timestamp with a monotonic sequence
counter so the message object is never reached in the comparison.

Fixes: Reader thread FATAL exception: '<' not supported between instances
of 'ClientTaskMessage' and 'ClientTaskMessage'

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent bbe9c75 commit 6965166b49793e5a6832217910b278c182767810
@axieyangb axieyangb authored 14 days ago
Showing 1 changed file
View
mesh-sdk/mesh_core/transport/grpc.py