Skip to content

Commit

Permalink
Merge pull request #409 from cocowh/additional_notes
Browse files Browse the repository at this point in the history
Additional Notes
  • Loading branch information
rayzhang0603 authored Dec 3, 2024
2 parents bbfcc98 + f2bfe8e commit a5f66bf
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 a5f66bf

Please sign in to comment.