mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-21 17:49:58 -05:00
Merge pull request #14395 from sepalani/tri-connect
AMMediaboard: Add more connect log messages
This commit is contained in:
commit
ddedae327f
|
|
@ -743,9 +743,11 @@ static s32 NetDIMMConnect(GuestSocket guest_socket, const GuestSocketAddress& gu
|
|||
|
||||
WSAPOLLFD pfds[1]{{.fd = host_socket, .events = POLLOUT}};
|
||||
|
||||
// TODO: Possible race between this socket's SetTimeOuts and others'
|
||||
const auto timeout =
|
||||
duration_cast<std::chrono::milliseconds>(std::chrono::microseconds{s_timeouts[0]});
|
||||
|
||||
// TODO: Might block if timeout is too big
|
||||
const int poll_result = PlatformPoll(pfds, timeout);
|
||||
|
||||
if (poll_result < 0) [[unlikely]]
|
||||
|
|
@ -757,7 +759,7 @@ static s32 NetDIMMConnect(GuestSocket guest_socket, const GuestSocketAddress& gu
|
|||
return SOCKET_ERROR;
|
||||
}
|
||||
|
||||
if ((pfds[0].revents & POLLOUT) == 0)
|
||||
if ((pfds[0].revents & (POLLOUT | POLLERR)) == 0)
|
||||
{
|
||||
// Timeout.
|
||||
s_last_error = SSC_EWOULDBLOCK;
|
||||
|
|
@ -776,10 +778,14 @@ static s32 NetDIMMConnect(GuestSocket guest_socket, const GuestSocketAddress& gu
|
|||
}
|
||||
else if (so_error == 0)
|
||||
{
|
||||
INFO_LOG_FMT(AMMEDIABOARD_NET, "NetDIMMConnect: connect( {}({}) ) succeeded", host_socket,
|
||||
u32(guest_socket));
|
||||
s_last_error = SSC_SUCCESS;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ERROR_LOG_FMT(AMMEDIABOARD_NET, "NetDIMMConnect: connect( {}({}) ) failed with error {}: {}",
|
||||
host_socket, u32(guest_socket), so_error, Common::DecodeNetworkError(so_error));
|
||||
s_last_error = SOCKET_ERROR;
|
||||
return SOCKET_ERROR;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user