efl_net_server_fd: close socket on destructor.

This commit is contained in:
Gustavo Sverzut Barbieri 2016-10-22 22:26:02 -02:00
parent 00fa8a8cc7
commit 5517c9b261
1 changed files with 8 additions and 0 deletions

View File

@ -99,6 +99,14 @@ _efl_net_server_fd_efl_object_constructor(Eo *o, Efl_Net_Server_Fd_Data *pd EINA
EOLIAN static void
_efl_net_server_fd_efl_object_destructor(Eo *o, Efl_Net_Server_Fd_Data *pd)
{
SOCKET fd = efl_loop_fd_get(o);
if (fd != INVALID_SOCKET)
{
efl_loop_fd_set(o, INVALID_SOCKET);
closesocket(fd);
}
efl_destructor(efl_super(o, MY_CLASS));
eina_stringshare_replace(&pd->address, NULL);