Tidied socket reads/writes
This commit is contained in:
@@ -24,6 +24,8 @@ xmppclient_new(struct sockaddr_in client_addr, int socket)
|
||||
void
|
||||
xmppclient_end_session(XMPPClient *client)
|
||||
{
|
||||
while (recv(client->sock, NULL, 1, 0) > 0) {}
|
||||
shutdown(client->sock, 2);
|
||||
close(client->sock);
|
||||
|
||||
free(client->ip);
|
||||
|
||||
Reference in New Issue
Block a user