Re #2008: Fixed error "Socket is already connected" when trying to connect to TURN server using the above patch
git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@5596 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
e0abc07c24
commit
f43c106b17
|
@ -892,10 +892,15 @@ static void turn_on_state(pj_turn_session *sess,
|
||||||
|
|
||||||
/* Initiate non-blocking connect */
|
/* Initiate non-blocking connect */
|
||||||
#if PJ_HAS_TCP
|
#if PJ_HAS_TCP
|
||||||
status=pj_activesock_start_connect(turn_sock->active_sock,
|
if (turn_sock->conn_type != PJ_TURN_TP_UDP) {
|
||||||
turn_sock->pool,
|
status=pj_activesock_start_connect(
|
||||||
&info.server,
|
turn_sock->active_sock,
|
||||||
pj_sockaddr_get_len(&info.server));
|
turn_sock->pool,
|
||||||
|
&info.server,
|
||||||
|
pj_sockaddr_get_len(&info.server));
|
||||||
|
} else {
|
||||||
|
status = PJ_SUCCESS;
|
||||||
|
}
|
||||||
if (status == PJ_SUCCESS) {
|
if (status == PJ_SUCCESS) {
|
||||||
on_connect_complete(turn_sock->active_sock, PJ_SUCCESS);
|
on_connect_complete(turn_sock->active_sock, PJ_SUCCESS);
|
||||||
} else if (status != PJ_EPENDING) {
|
} else if (status != PJ_EPENDING) {
|
||||||
|
|
Loading…
Reference in New Issue