FS-11917: [mod_event_socket] Added error logging if cannot parse IP address

This commit is contained in:
Sergey Safarov 2019-07-08 14:19:03 +03:00
parent 75cfacf4c2
commit 6704d3aabe
No known key found for this signature in database
GPG Key ID: 4C6FFE88A2BEB144
1 changed files with 3 additions and 1 deletions

View File

@ -2934,8 +2934,10 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_event_socket_runtime)
while (!prefs.done) {
rv = switch_sockaddr_info_get(&sa, prefs.ip, SWITCH_UNSPEC, prefs.port, 0, pool);
if (rv)
if (rv) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot get information about IP address %s\n", prefs.ip);
goto fail;
}
rv = switch_socket_create(&listen_list.sock, switch_sockaddr_get_family(sa), SOCK_STREAM, SWITCH_PROTO_TCP, pool);
if (rv)
goto sock_fail;