Method: Channel#inject_message

Defined in:
lib/signalfx/signalflow/channel.rb

#inject_message(msg) ⇒ Object



70
71
72
73
74
75
76
77
78
# File 'lib/signalfx/signalflow/channel.rb', line 70

def inject_message(msg)
  # Since messages are injected by a separate websocket thread, they could
  # come in after the user has detached manually from the channel.  Just
  # silently ignore them in that case.
  return if @detached
  raise 'Cannot inject nil message' if msg.nil?

  @messages << msg
end