fix: trace delayed websocket acknowledgements
This commit is contained in:
@@ -447,12 +447,19 @@ func (s *Session) queueOut(msg *ServerComMessage) bool {
|
||||
logs.Err.Println("s.queueOut: session's send queue full", s.sid)
|
||||
return false
|
||||
}
|
||||
if isAcceptedCtrl(msg) && s.proto == WEBSOCK {
|
||||
immetrics.ObserveCtrlACKDelivery("enqueue", msg.Timestamp)
|
||||
}
|
||||
if s.isMultiplex() {
|
||||
s.scheduleClusterWriteLoop()
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func isAcceptedCtrl(msg *ServerComMessage) bool {
|
||||
return msg != nil && msg.Ctrl != nil && msg.Ctrl.Code == http.StatusAccepted && msg.Ctrl.Id != ""
|
||||
}
|
||||
|
||||
// queueOutBytes attempts to send a ServerComMessage already serialized to []byte.
|
||||
// If the send buffer is full, it fails.
|
||||
func (s *Session) queueOutBytes(data []byte) bool {
|
||||
|
||||
Reference in New Issue
Block a user