Fix leak.
Close native socket explicitly, after streams have been destroyed.