]> www.infradead.org Git - pidgin-chime.git/commitdiff
Don't attempt to send on NULL ws
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 11 Apr 2018 11:31:01 +0000 (13:31 +0200)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 11 Apr 2018 11:44:35 +0000 (13:44 +0200)
On reconnect, RT packets could be submitted while there is no active
transport

chime/chime-call-transport.c

index e3d496975d81cd4e5d97be00711c5ea1a6564fad..bffa86a8ad22b4cbb4ac2a07cb124be6111e0434 100644 (file)
@@ -655,7 +655,7 @@ void chime_call_transport_send_packet(ChimeCallAudio *audio, enum xrp_pkt_type t
        g_mutex_lock(&audio->transport_lock);
        if (audio->dtls_sess)
                gnutls_record_send(audio->dtls_sess, hdr, len);
-       else
+       else if (audio->ws)
                soup_websocket_connection_send_binary(audio->ws, hdr, len);
        g_mutex_unlock(&audio->transport_lock);
        g_free(hdr);