mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
This commit is contained in:
@ -28,7 +28,7 @@ func (peer *Peer) WriteData(v interface{}) error {
|
||||
}
|
||||
|
||||
func (peer *Peer) Destroy() error {
|
||||
if peer.connection != nil && peer.connection.ConnectionState() == webrtc.PeerConnectionStateConnected {
|
||||
if peer.connection != nil && peer.connection.ConnectionState() != webrtc.PeerConnectionStateClosed {
|
||||
if err := peer.connection.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user