mirror of
https://github.com/matrix-org/sliding-sync.git
synced 2025-03-10 13:37:11 +00:00
Check cancel func is nonnil before calling
Grr. Is there no tooling for this?
This commit is contained in:
parent
c37e906bf5
commit
db0fde8860
@ -725,7 +725,9 @@ func (s *ConnState) trackProcessDuration(ctx context.Context, dur time.Duration,
|
||||
func (s *ConnState) Destroy() {
|
||||
s.userCache.Unsubscribe(s.userCacheID)
|
||||
logger.Debug().Str("user_id", s.userID).Str("device_id", s.deviceID).Msg("cancelling any in-flight requests")
|
||||
s.cancelLatestReq()
|
||||
if s.cancelLatestReq != nil {
|
||||
s.cancelLatestReq()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *ConnState) Alive() bool {
|
||||
|
Loading…
x
Reference in New Issue
Block a user