Do not discard socket resource after closing it