Skip to content
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

Shutdown waits for end of processing #49

Open
ivajloip opened this issue May 22, 2019 · 2 comments
Open

Shutdown waits for end of processing #49

ivajloip opened this issue May 22, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@ivajloip
Copy link

Hello,

Thank you very much for the excellent project! So far this is the best CoAP library that I have used!

I am using it for an application that I am creating and I started looking into the shutdown logic. From what I saw in the code, when the shutdown method is called, the listener stops accepting requests, but there is no guarantee that all the requests that are already accepted will finish their processing. I believe I can add logic in my handler type for keeping track of this, so that my application can call server.Shutdown() followed by handler.Close() and have a guarantee that all processing is over, but I thought the better approach might be if the server library takes care of it as other will face a similar problem.

I need to make sure all the processing is over as I don't want to exit the application and interrupt some processing that might result in inconsistent state.

Cheers,

@jkralik jkralik added the enhancement New feature or request label May 22, 2019
@jkralik
Copy link
Member

jkralik commented May 22, 2019

Hi.
I think this is a good feature. If you have time could you create for that PR ? I will merge it. For now I'm very busy with OCF Cloud staff.
Thx

@ivajloip
Copy link
Author

Hi,

Yes, I will try to do that one of those days.

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants