diff options
-rw-r--r-- | srs-client/srs-client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/srs-client/srs-client.c b/srs-client/srs-client.c index d16c597..6f3b467 100644 --- a/srs-client/srs-client.c +++ b/srs-client/srs-client.c @@ -270,8 +270,6 @@ int srs_client_send(struct srs_client *client, unsigned short command, if (client == NULL || client->fd < 0) return -1; - SRS_CLIENT_LOCK(client); - memset(&message, 0, sizeof(message)); message.command = command; message.data = data; @@ -288,6 +286,8 @@ int srs_client_send(struct srs_client *client, unsigned short command, memcpy(p, message.data, message.size); } + SRS_CLIENT_LOCK(client); + memset(&timeout, 0, sizeof(timeout)); timeout.tv_usec = 300; |