Fixed not closing sockets in wireless.c