question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onBye() method for `OutgoingRequestDelegate` interface

See original GitHub issue

Currently I can see no way to react to the receiver hanging up other than hooking into the SessionState.Terminated stateChange. Along with the existing methods, setting up a method to call on when the Session generated by the request gets a BYE would be a really useful addition to the library.

I saw there is an onBye() in core/ but personally don’t see a way to set that. If a method to do this exists already perhaps it could be documented in the example code?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
john-e-riordancommented, Apr 17, 2020

Getting the Reason header from the BYE seems like reason enough to add onBye() to session delegate.

If an onBye handler is provided, the handler it will be responsible for accepting the BYE (sending the 200 Ok to the BYE). So minimum handler will look something like…

session.delegate = {
  onBye: (bye) void => {
    bye.accept();
  }
};

Just as reiteration for future readers, onBye is/will not be sufficient to detect Session termination - use the session state for that.

0reactions
james-criscuolocommented, Apr 29, 2020

This has been merged and release with 0.15.11, closing. Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ASP.NET Core Middleware | Microsoft Learn
The simplest possible ASP.NET Core app sets up a single request delegate that handles all requests. This case doesn't include an actual request...
Read more >
Ensuring that outgoing WCF requests are performed using a ...
I have a remote WCF web service that I'm connecting to from my application. The application may be running on a server with...
Read more >
HttpClientFactory in ASP.NET Core 2.1 (Part 3) - Steve Gordon
You can define a chain of handlers as a pipeline, which will all have the chance to process an outgoing HTTP request before...
Read more >
ASP.NET Core Middleware with Examples - Dot Net Tutorials
In ASP.NET Core, you can configure the Request delegates using the Run, Map, and Use extension methods. You can specify a request delegate...
Read more >
Using Middleware in .NET 5.0 to Log Requests and Responses
So, my team and I built a new API using .NET 5.0. One of our requirements for this project was that, because this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found