fix close sockets after close application