mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
websocketserver: Retry listen on IPv4 if IPv6 is not available
Fixes #1311
This commit is contained in:
parent
ac00465565
commit
6434c42155
@ -113,6 +113,10 @@ void WebSocketServer::Start()
|
||||
} else {
|
||||
blog(LOG_INFO, "[WebSocketServer::Start] Not locked to IPv4 bindings");
|
||||
_server.listen(conf->ServerPort, errorCode);
|
||||
if (errorCode && errorCode == websocketpp::lib::asio::error::address_family_not_supported) {
|
||||
blog(LOG_INFO, "[WebSocketServer::Start] IPv6 address family not supported, binding only to IPv4");
|
||||
_server.listen(websocketpp::lib::asio::ip::tcp::v4(), conf->ServerPort, errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
if (errorCode) {
|
||||
|
Loading…
Reference in New Issue
Block a user