Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix #214. Lose ami connection after restart Asterisk#215

Open
Gref2007 wants to merge 1 commit into
AsterNET:masterAsterNET/AsterNET:masterfrom
Gref2007:masterGref2007/AsterNET:masterCopy head branch name to clipboard
Open

Fix #214. Lose ami connection after restart Asterisk#215
Gref2007 wants to merge 1 commit into
AsterNET:masterAsterNET/AsterNET:masterfrom
Gref2007:masterGref2007/AsterNET:masterCopy head branch name to clipboard

Conversation

@Gref2007

@Gref2007 Gref2007 commented Dec 11, 2019

Copy link
Copy Markdown

Fixes: #214

@Deantwo Deantwo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good and follows the existing code format.
Could use a test scenario or code to reproduce the issue, so we can see if it is fixed.

Comment thread Asterisk.2013/Asterisk.NET/Manager/ManagerReader.cs
@Gref2007

Gref2007 commented Dec 13, 2019

Copy link
Copy Markdown
Author

Could use a test scenario or code to reproduce the issue, so we can see if it is fixed.

Sorry, i don't know how correct reproduce issue or write clear test.
But i can show, how i do it.
Use checkManagerAPI() in AsterNET.Test.
Set manager.PingInterval = 1;. It is need for increase chance catch bug.
Somewhere in 'while loop' in ManagerReader.Run() set Console.WriteLine("Thread = " + Thread.CurrentThread.ManagedThreadId);
It is help you see, that we still read from socket.
And finally, on Asterisk execute :
for i in {1..10}; do /usr/sbin/asterisk -rx'core restart now'; date; sleep 5; done.
You will see, that usually after 1-3 restart asterisk, we stop listen ami.

@Gref2007 Gref2007 requested a review from Deantwo December 18, 2019 11:51

@Deantwo Deantwo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We really need to rewrite the entire communication layer.

@Gref2007 Gref2007 requested a review from Deantwo February 25, 2020 09:38
@Deantwo

Deantwo commented Feb 25, 2020

Copy link
Copy Markdown
Collaborator

I haven't had the time to test this right now. Not sure when I will have the time.

But feel free to add some code snippets to make testing easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lose connection after restart Asterisk.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.