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.

DisconnectHandler is never called

See original GitHub issue

Description

I created a Custom Control that inherits from ElementHandler and at the moment that the control is closed the DisconnectHandler method isn’t called, even if I set the VirtualView.Handler to null.

Steps to Reproduce

  1. Add breakpoints here
  2. Start the sample app
  3. Scroll to the bottom and press the button
  4. See the popup
  5. Click outside the popup to close it
  6. The DisconnectHandler isn’t called

Version with bug

Preview 10 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11

Did you find any workaround?

No

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:16 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
J-Swiftcommented, May 19, 2022

Thats really surprising : counterintuitive. Isnt that the whole point of connect/disconnect, that I want my resources cleaned up at that point? I dont put anything in those blocks if I dont want that. Especially because ConnectHandler is where you attach touch handlers etc as far as Im aware, I think its a recipe for surprising behavior and memory leaking.

1reaction
PureWeencommented, May 20, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is my disconnect() handler not getting fired in SignalR ...
I'm trying to hook some call backs in the client and they don't seem to be getting fired. I'd really like to get...
Read more >
Disconnect handler not running
The disconnect handler appears to be ran only when a disconnect component is explicitly called. That is if the call ends execution on...
Read more >
Disconnect handler does not work when turning on ...
But when I go into airplane mode, my disconnect handler is never called and the user still appears online. After reestablishing the connection, ......
Read more >
Understanding and Handling Connection Lifetime Events ...
This article provides an overview of the SignalR connection, reconnection, and disconnection events that you can handle, and timeout and ...
Read more >
Voice JS SDK v1: Twilio.Connection
Connection object represents a call to or from Twilio. You never instantiate it directly, but it's passed to event handlers and returned when...
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