File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -427,12 +427,10 @@ static CAddress GetBindAddress(const Sock& sock)
427
427
CAddress addr_bind;
428
428
struct sockaddr_storage sockaddr_bind;
429
429
socklen_t sockaddr_bind_len = sizeof (sockaddr_bind);
430
- if (sock.Get () != INVALID_SOCKET) {
431
- if (!sock.GetSockName ((struct sockaddr *)&sockaddr_bind, &sockaddr_bind_len)) {
432
- addr_bind.SetSockAddr ((const struct sockaddr *)&sockaddr_bind);
433
- } else {
434
- LogPrintLevel (BCLog::NET, BCLog::Level::Warning, " getsockname failed\n " );
435
- }
430
+ if (!sock.GetSockName ((struct sockaddr *)&sockaddr_bind, &sockaddr_bind_len)) {
431
+ addr_bind.SetSockAddr ((const struct sockaddr *)&sockaddr_bind);
432
+ } else {
433
+ LogPrintLevel (BCLog::NET, BCLog::Level::Warning, " getsockname failed\n " );
436
434
}
437
435
return addr_bind;
438
436
}
You can’t perform that action at this time.
0 commit comments