Place the assert on main_socket before setting it

Prevents lwan_main_loop() from being called multiple times.