Fix TCP concurrent sending problem
This commit is contained in:
parent
c47a7ea628
commit
55ff684d09
1 changed files with 4 additions and 0 deletions
|
@ -312,6 +312,8 @@ socket_send_message (NiceSocket *sock,
|
|||
if (priv->error)
|
||||
return -1;
|
||||
|
||||
g_mutex_lock(&mutex);
|
||||
|
||||
message_len = output_message_get_size (message);
|
||||
|
||||
/* First try to send the data, don't send it later if it can be sent now
|
||||
|
@ -353,6 +355,8 @@ socket_send_message (NiceSocket *sock,
|
|||
}
|
||||
}
|
||||
|
||||
g_mutex_unlock(&mutex);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue