Skip to content

Commit

Permalink
Additional Notes
Browse files Browse the repository at this point in the history
  • Loading branch information
wuhua3 committed Dec 3, 2024
1 parent bbfcc98 commit f2bfe8e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions endpoint/motanCommonEndpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ func (c *Channel) newStream(req motan.Request, rc *motan.RPCContext, deadline ti
return nil, ErrChannelShutdown
}
s := acquireStream()
// ensure uniqueness and avoid duplicate ids from different clients
s.streamId = GenerateRequestID()
s.channel = c
s.isHeartbeat = false
Expand Down Expand Up @@ -695,6 +696,7 @@ func (c *Channel) recvLoop() error {

func (c *Channel) handleMsg(msg interface{}, t time.Time) {
var isHeartbeat bool
// rid is stream id, not request id,
var rid uint64
if v1msg, ok := msg.(*mpro.MotanV1Message); ok {
res, err := mpro.DecodeMotanV1Response(v1msg)
Expand Down

0 comments on commit f2bfe8e

Please sign in to comment.