devopvoid / webrtc-java

WebRTC for desktop platforms running Java
Apache License 2.0
248 stars 60 forks source link

NPE on dev.onvoid.webrtc.RTCPeerConnection.getConnectionState on closed connection #35

Closed thelsing closed 2 years ago

thelsing commented 2 years ago

Describe the bug After the RTCPeerConnection is closed, calls to getConnectionState() throw a NPE.

To Reproduce Steps to reproduce the behavior:

  1. Establish a RTCPeerConnection
  2. Close it.
  3. Call getConnectionsState()
  4. See NPE.

Expected behavior Simple state methods should return a default value if the native object was discarded. In this case RTCPeerConnectionState.CLOSED or DISCONNECTED.

devopvoid commented 2 years ago

Thanks for the report, @thelsing !

Will fix that ASAP