Set SO_REUSEADDR before calling bind().