# Videoroom publisher. hangup event occur when the network is disconnected?

**URL:** <https://janus.discourse.group/t/videoroom-publisher-hangup-event-occur-when-the-network-is-disconnected/1427>\
**Category:** General\
**Created:** [December 26, 2024, 7:55am UTC](https://janus.discourse.group/t/videoroom-publisher-hangup-event-occur-when-the-network-is-disconnected/1427 "2024-12-26T07:55:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaejong](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jaejong](https://janus.discourse.group/u/Jaejong)\
**Post date:** [December 26, 2024, 7:55am UTC](https://janus.discourse.group/t/videoroom-publisher-hangup-event-occur-when-the-network-is-disconnected/1427/1 "2024-12-26T07:55:13Z")

</div>

There are times when the hangup event does not occur.  
Could this be an issue with the libnice library?

Options and versions in use

- hangup\_on\_failed=true
- ice\_consent\_freshness=true
- janus 1.2.1
- libnice 0.1.21

---

<div class="post-metadata">

**Author:** ![atoppi](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/atoppi/32/8_2.png) [@atoppi](https://janus.discourse.group/u/atoppi)\
**Post date:** [January 2, 2025, 11:20am UTC](https://janus.discourse.group/t/videoroom-publisher-hangup-event-occur-when-the-network-is-disconnected/1427/2 "2025-01-02T11:20:13Z")

</div>

Hi,  
it’s a bit difficult to reply properly without any context here.  
Please try to describe the scenario where hangup does not occur, in terms of:

- available network interfaces (client and server)
- plugin in use
- janus logs
- (ideally) webrtc internals dump

---

<div class="post-metadata">

**Author:** ![Jaejong](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jaejong](https://janus.discourse.group/u/Jaejong)\
**Post date:** [January 3, 2025, 4:09am UTC](https://janus.discourse.group/t/videoroom-publisher-hangup-event-occur-when-the-network-is-disconnected/1427/3 "2025-01-03T04:09:29Z")

</div>

Thank you for your reply.

We are using the VideoRoom plugin. The VideoRoom publisher is an Android mobile client connected via Wi-Fi.  
The Janus server is on a wired network and resides behind the same NAT as the mobile client.  
The mobile client creates a VideoRoom and joins as a publisher.

When the mobile client’s battery runs out and the device powers off, there are cases where the hangup event does not occur on the WebRTC PeerConnection of the VideoRoom publisher.

---

<div class="post-metadata">

**Author:** ![atoppi](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/atoppi/32/8_2.png) [@atoppi](https://janus.discourse.group/u/atoppi)\
**Post date:** [January 3, 2025, 8:50am UTC](https://janus.discourse.group/t/videoroom-publisher-hangup-event-occur-when-the-network-is-disconnected/1427/4 "2025-01-03T08:50:54Z")

</div>

What about the events on the transport session? If the device shutdowns, the websocket or the long poll session will be destroyed eventually.

---

<div class="post-metadata">

**Author:** ![Jaejong](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jaejong](https://janus.discourse.group/u/Jaejong)\
**Post date:** [January 3, 2025, 4:04pm UTC](https://janus.discourse.group/t/videoroom-publisher-hangup-event-occur-when-the-network-is-disconnected/1427/5 "2025-01-03T16:04:27Z")

</div>

I truly truly appreciate your response ans janus.  
I love janus.

* * *

What about the events on the transport session?  
 → I didn’t understand what you meant. Could you please explain it?

If the device shutdowns, the websocket or the long poll session will be destroyed eventually.  
 → I know that already. Since English is not my native language, I couldn’t explain it in detail.  
Since I am using a translation tool to write this, I kindly ask for your understanding in advance.

* * *

I am developing an application server that manages Janus sessions and VideoRoom handles.  
This application server handles creating/deleting Janus sessions and creating/joining/deleting VideoRooms based on client requests.

The Android mobile client mentioned in the comment is a WebRTC client + private client.  
This mobile client creates and joins VideoRooms through integration with the application server.  
As a result, a WebRTC PeerConnection between the mobile client and Janus VideoRoom Publisher’s WebRTC PeerConnection will be established.

With the configuration settings hangup\_on\_failed=true and ice\_consent\_freshness=true applied in Janus.  
Under these conditions, if the device shutdowns, ICE consent freshness will fail.  
Since the hangup\_on\_failed option is set to true, a hangup event should be triggered upon failure.

but there are rare occasions when the hangup event does not occur.  
I requested help because I need to verify whether the issue is with the development or the application server.

---

<div class="post-metadata">

**Author:** ![atoppi](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/atoppi/32/8_2.png) [@atoppi](https://janus.discourse.group/u/atoppi)\
**Post date:** [January 3, 2025, 4:20pm UTC](https://janus.discourse.group/t/videoroom-publisher-hangup-event-occur-when-the-network-is-disconnected/1427/6 "2025-01-03T16:20:07Z")

</div>

The only explanation for not receiving the hangup event is that the related handle is being detached before. Keep track of the events coming from Janus and check for detach/destroyed.

---

<div class="post-metadata">

**Author:** ![Jaejong](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jaejong](https://janus.discourse.group/u/Jaejong)\
**Post date:** [January 4, 2025, 1:04am UTC](https://janus.discourse.group/t/videoroom-publisher-hangup-event-occur-when-the-network-is-disconnected/1427/7 "2025-01-04T01:04:02Z")

</div>

Thank you very much. I understand.
