queueRST enqueues a RST frame for the given session to be delivered to owner on its next poll. Also wakes that client's long-poll so the RST is flushed immediately rather than after the long-poll deadline.
(owner [frame.ClientIDLen]byte, sessionID [frame.SessionIDLen]byte)
| 544 | // owner on its next poll. Also wakes that client's long-poll so the RST is |
| 545 | // flushed immediately rather than after the long-poll deadline. |
| 546 | func (s *Server) queueRST(owner [frame.ClientIDLen]byte, sessionID [frame.SessionIDLen]byte) { |
| 547 | rst := &frame.Frame{SessionID: sessionID, Flags: frame.FlagRST} |
| 548 | s.mu.Lock() |
| 549 | s.pendingRSTs[owner] = append(s.pendingRSTs[owner], rst) |
| 550 | s.mu.Unlock() |
| 551 | s.kick(owner) |
| 552 | } |
| 553 | |
| 554 | func (s *Server) queueVersionResponse(owner [frame.ClientIDLen]byte, sessionID [frame.SessionIDLen]byte) { |
| 555 | payload, err := protocol.EncodeVersionInfo(s.version, MaxFramePayload, []string{"zstd", "raw_base64"}) |