https://webrtc.github.io/samples/src/content/peerconnection/bandwidth/if you add event listeners
pc1.addEventListener('connectionstatechange', () => console.log('C', pc1.connectionState));
pc1.addEventListener('iceconnectionstatechange', () => console.log('I', pc1.iceConnectionState))
and then close the second peerconnection with
pc2.close()
If you are seeing something else you might want to cross-check with chrome://webrtc-internals
Calling close won't fire events (on the same connection) since it is a user-triggered action.