Don't assume socket creation is always succeed (not when using torsocks)
This commit is contained in:
parent
fdfaa62a09
commit
a8b1c54092
@ -71,6 +71,8 @@ Network::Network(int peer_count, int channel_limit,
|
||||
// Any port
|
||||
new_addr.port = 0;
|
||||
m_host = enet_host_create(&new_addr, peer_count, channel_limit, 0, 0);
|
||||
if (!m_host)
|
||||
Log::fatal("Network", "Failed to create socket with any port.");
|
||||
}
|
||||
} // Network
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user