Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: GetRequestsInFlight return copies lock value #392

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
if len(UID) > 0 {
s.uid = UID[0]
}
return s

Check failure on line 201 in session/session.go

View workflow job for this annotation

GitHub Actions / Nats Test End to End

cannot use s (variable of type *sessionImpl) as Session value in return statement: *sessionImpl does not implement Session (wrong type for method GetRequestsInFlight)

Check failure on line 201 in session/session.go

View workflow job for this annotation

GitHub Actions / GRPC Test End to End

cannot use s (variable of type *sessionImpl) as Session value in return statement: *sessionImpl does not implement Session (wrong type for method GetRequestsInFlight)

Check failure on line 201 in session/session.go

View workflow job for this annotation

GitHub Actions / Unit Test

cannot use s (variable of type *sessionImpl) as Session value in return statement: *sessionImpl does not implement Session (wrong type for method GetRequestsInFlight)
}

// NewSessionPool returns a new session pool instance
Expand Down Expand Up @@ -424,7 +424,7 @@

s.uid = uid
for _, cb := range s.pool.sessionBindCallbacks {
err := cb(ctx, s)

Check failure on line 427 in session/session.go

View workflow job for this annotation

GitHub Actions / Nats Test End to End

cannot use s (variable of type *sessionImpl) as Session value in argument to cb: *sessionImpl does not implement Session (wrong type for method GetRequestsInFlight)

Check failure on line 427 in session/session.go

View workflow job for this annotation

GitHub Actions / GRPC Test End to End

cannot use s (variable of type *sessionImpl) as Session value in argument to cb: *sessionImpl does not implement Session (wrong type for method GetRequestsInFlight)

Check failure on line 427 in session/session.go

View workflow job for this annotation

GitHub Actions / Unit Test

cannot use s (variable of type *sessionImpl) as Session value in argument to cb: *sessionImpl does not implement Session (wrong type for method GetRequestsInFlight)
if err != nil {
s.uid = ""
return err
Expand All @@ -451,7 +451,7 @@

// invoke after callbacks on session bound
for _, cb := range s.pool.afterBindCallbacks {
err := cb(ctx, s)

Check failure on line 454 in session/session.go

View workflow job for this annotation

GitHub Actions / Nats Test End to End

cannot use s (variable of type *sessionImpl) as Session value in argument to cb: *sessionImpl does not implement Session (wrong type for method GetRequestsInFlight)

Check failure on line 454 in session/session.go

View workflow job for this annotation

GitHub Actions / GRPC Test End to End

cannot use s (variable of type *sessionImpl) as Session value in argument to cb: *sessionImpl does not implement Session (wrong type for method GetRequestsInFlight)

Check failure on line 454 in session/session.go

View workflow job for this annotation

GitHub Actions / Unit Test

cannot use s (variable of type *sessionImpl) as Session value in argument to cb: *sessionImpl does not implement Session (wrong type for method GetRequestsInFlight)
if err != nil {
s.uid = ""
return err
Expand Down Expand Up @@ -853,8 +853,8 @@
return len(s.requestsInFlight.m) != 0
}

func (s *sessionImpl) GetRequestsInFlight() ReqInFlight {
return s.requestsInFlight
func (s *sessionImpl) GetRequestsInFlight() *ReqInFlight {
return &s.requestsInFlight
}

func (s *sessionImpl) SetRequestInFlight(reqID string, reqData string, inFlight bool) {
Expand Down
Loading