perf: sync protocol and core hardening updates
This commit is contained in:
parent
152fed3b87
commit
4390ebf5a9
283 changed files with 29231 additions and 2295 deletions
|
|
@ -14,7 +14,7 @@ func (r *Router) pushUserMessage(ctx context.Context, userID int64, logMessage s
|
|||
}
|
||||
sessionID, _ := SessionIDFrom(ctx)
|
||||
if timeout := r.cfg.OutboundPushTimeout; timeout > 0 {
|
||||
authKeyID, _ := AuthKeyIDFrom(ctx)
|
||||
authKeyID := rawAuthKeyIDForOrigin(ctx)
|
||||
if scoped, ok := r.deps.Sessions.(ScopedBestEffortSessionBinder); ok {
|
||||
if sent, err := scoped.PushToUserExceptAuthKeySessionBestEffort(ctx, userID, authKeyID, sessionID, proto.MessageFromServer, msg, timeout); err != nil {
|
||||
r.log.Debug(logMessage, zap.Int64("user_id", userID), zap.Int("sent", sent), zap.Duration("timeout", timeout), zap.Error(err))
|
||||
|
|
@ -33,7 +33,7 @@ func (r *Router) pushUserMessage(ctx context.Context, userID int64, logMessage s
|
|||
}
|
||||
}
|
||||
if scoped, ok := r.scopedSessions(); ok {
|
||||
authKeyID, _ := AuthKeyIDFrom(ctx)
|
||||
authKeyID := rawAuthKeyIDForOrigin(ctx)
|
||||
if sent, err := scoped.PushToUserExceptAuthKeySession(ctx, userID, authKeyID, sessionID, proto.MessageFromServer, msg); err != nil {
|
||||
r.log.Debug(logMessage, zap.Int64("user_id", userID), zap.Int("sent", sent), zap.Error(err))
|
||||
return sent
|
||||
|
|
@ -58,7 +58,7 @@ func (r *Router) pushUserMessageTransient(ctx context.Context, userID int64, log
|
|||
}
|
||||
if transient, ok := r.deps.Sessions.(TransientSessionBinder); ok {
|
||||
sessionID, _ := SessionIDFrom(ctx)
|
||||
authKeyID, _ := AuthKeyIDFrom(ctx)
|
||||
authKeyID := rawAuthKeyIDForOrigin(ctx)
|
||||
sent, err := transient.PushToUserTransientExceptAuthKeySession(ctx, userID, authKeyID, sessionID, proto.MessageFromServer, msg, r.cfg.OutboundPushTimeout)
|
||||
if err != nil {
|
||||
r.log.Debug(logMessage, zap.Int64("user_id", userID), zap.Int("sent", sent), zap.Error(err))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue