Expose native chat compaction activity and retained replay
This commit is contained in:
@@ -45,10 +45,12 @@ func handleChatClose(ctx context.Context, request protocol.Message, broker chatB
|
||||
// idle session is never interrupted.
|
||||
interrupted := hub.turnInFlight(sessionID)
|
||||
if interrupted {
|
||||
resetCompaction := hub.compactionReset(sessionID)
|
||||
if err := broker.Interrupt(ctx, sessionID); err != nil {
|
||||
_ = write(protocol.Message{Type: protocol.Error, ID: request.ID, Error: "session " + sessionID + " could not be stopped: " + err.Error()})
|
||||
return
|
||||
}
|
||||
resetCompaction()
|
||||
}
|
||||
if err := registry.CloseOperatorSession(ctx, sessionID); err != nil {
|
||||
_ = write(protocol.Message{Type: protocol.Error, ID: request.ID, Error: err.Error()})
|
||||
|
||||
Reference in New Issue
Block a user