-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RubyFS stops listening after sending an event #6
Comments
Here |
@bklang A couple of things I'd like you to try: fs.command "sendevent message_waiting", options do |response|
# throw away
end fs.async.command "sendevent message_waiting", options If either (or both) of these "fix" the issue that will help me narrow down what I'm looking at. |
I will try both of these. But to make sure I understand the impact of each: The first, passing a callback, if it "works" likely represents a memory leak, as every sent command will register a block that will never be called? The second, calling it async, will eventually deadlock Celluloid as soon as the thread pool is tied up with all the async commands? I'll let you know the results of my testing. |
Why would it not be called? My expectation is that it would be called and there would be no leak.
Again, I don't see why this would be the case. |
Both solutions work: When passing a callback, I am able to get multiple commands to execute, in other words, no deadlock. Also, the callback is invoked, as logging inside the block is observed. When using |
@bklang Try your original code again with that change? |
From Gemfile.lock:
No such luck. Still seems to hang after the first call to |
I have code that looks like this to respond to MESSAGE_QUERY events from FreeSWITCH and respond by providing Message Waiting Indicator messages:
The first
MESSAGE_QUERY
received by Adhearsion is properly handled. You can see this in the packet capture here: https://gist.github.com/bklang/37d3b19f430af099718c#file-gistfile1-txt-L27Lines 27-30 are Adhearsion talking to FreeSWITCH; every other line in that file is FreeSWITCH talking to Adhearsion.
The Adhearsion TRACE logs properly show all IES messages being received up to the point of sending the
sendevent
message. After that point, no further messages are logged, and the subsequentMESSAGE_QUERY
events are ignored.The text was updated successfully, but these errors were encountered: