Skip to content

added wait timeout to server start - #918

Merged
gittiver merged 2 commits into
masterfrom
885-there-are-no-exceptions-with-run_async
Jan 15, 2025
Merged

gittiver merged 2 commits into
masterfrom
885-there-are-no-exceptions-with-run_async

Conversation

@gittiver

Copy link
Copy Markdown
Member

No description provided.

@gittiver gittiver linked an issue Oct 14, 2024 that may be closed by this pull request
@fliiiix

fliiiix commented Oct 15, 2024

Copy link
Copy Markdown
Contributor

I quickly tested it and it worked fine for me 🥳 The only downside i see is that we still lose the information why it failed

@gittiver

Copy link
Copy Markdown
Member Author

The only downside i see is that we still lose the information why it failed

Isn't that logged?

@fliiiix

fliiiix commented Oct 15, 2024 •

Copy link
Copy Markdown
Contributor

hmm, I see, the timeout can have different reasons and in addition the Acceptor and endpoint are created in the constructor of the server. Would make this ticket bigger.

@fliiiix

fliiiix commented Oct 18, 2024

Copy link
Copy Markdown
Contributor

Did you written your answer on purpose as edit on my comment? 😆

I mean i think this fix already brings value the way it is now but to fully fix it it probably should log the errors that happen.

@gittiver

Copy link
Copy Markdown
Member Author

Did you written your answer on purpose as edit on my comment? 😆
No, I was in a hurry.

I mean i think this fix already brings value the way it is now but to fully fix it it probably should log the errors that happen.
I agree, I was thinking about a separate PR for that to keep changes in this one simple.

@gittiver
gittiver marked this pull request as draft October 18, 2024 14:18
@gittiver gittiver self-assigned this Oct 21, 2024
@gittiver
gittiver force-pushed the 885-there-are-no-exceptions-with-run_async branch from f872423 to 21ee6b7 Compare November 4, 2024 21:07
@gittiver
gittiver force-pushed the 885-there-are-no-exceptions-with-run_async branch from 21ee6b7 to d566cb9 Compare November 25, 2024 12:59
@gittiver
gittiver marked this pull request as ready for review November 25, 2024 20:48
@gittiver

Copy link
Copy Markdown
Member Author

Invalid address strings are now logged, so mission complete. :)

Comment thread include/crow/app.h Resolved
@fliiiix

fliiiix commented Nov 26, 2024

Copy link
Copy Markdown
Contributor

I found another case 🙈 where if the port is already used we also just see a timeout:

(2024-11-26 08:10:18) [INFO    ] Before wait
(2024-11-26 08:10:21) [INFO    ] After wait
(2024-11-26 08:10:21) [INFO    ] Timeout

But im not sure if we can check for that, and this version is already way better than before 🥳

@gittiver

Copy link
Copy Markdown
Member Author

I found another case 🙈 where if the port is already used we also just see a timeout:

(2024-11-26 08:10:18) [INFO    ] Before wait
(2024-11-26 08:10:21) [INFO    ] After wait
(2024-11-26 08:10:21) [INFO    ] Timeout

But im not sure if we can check for that, and this version is already way better than before 🥳

This has to be handled inside of the server, I would propose to handle in a different issue - or maybe there are already some for this.

@gittiver
gittiver force-pushed the 885-there-are-no-exceptions-with-run_async branch from f66f065 to e31486d Compare November 26, 2024 09:35

@fliiiix fliiiix left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice 🥳

@gittiver
gittiver requested a review from fliiiix November 26, 2024 10:02

@fliiiix fliiiix left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ran some manual tests against this latest version which worked fine for me

[100%] Built target radiopi
(2024-11-26 11:49:19) [INFO    ] Playing some music
(2024-11-26 11:49:19) [ERROR   ] Invalid argument - Can not create valid ip address from string: "0.0.0.a"

@gittiver
gittiver force-pushed the 885-there-are-no-exceptions-with-run_async branch 2 times, most recently from de64c1f to 8d6a100 Compare January 1, 2025 12:22
@gittiver
gittiver force-pushed the 885-there-are-no-exceptions-with-run_async branch 2 times, most recently from 440bb2e to 5f19a1f Compare January 7, 2025 21:21
… logged now, server runs into timeout in that case

added testcase for invalid address
@gittiver
gittiver force-pushed the 885-there-are-no-exceptions-with-run_async branch from 5f19a1f to 44bc055 Compare January 15, 2025 07:20
@gittiver
gittiver merged commit b57abf2 into master Jan 15, 2025
@gittiver
gittiver deleted the 885-there-are-no-exceptions-with-run_async branch February 4, 2025 19:03
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.

There are no exceptions with run_async()

2 participants