bugfix: segmentation fault might happen when the downstream cosocket objects were GC'd. this regression had appeared in commit e768e151ab3.