fixed task shutdown to close sockets
no leaks omg!