Commit 02563a35 authored by Max Kellermann's avatar Max Kellermann

lib/nfs/Connection: fix reconnect after mount failure

When mounting had not yet finished, SocketMonitor::IsDefined() was always false, due to the workaround at the beginning of the function that calls SocketMonitor::Steal(). This commit drops the IsDefined() check because it was never necessary and breaks reconnect.
parent d653f35b
...@@ -2,6 +2,7 @@ ver 0.19.7 (not yet released) ...@@ -2,6 +2,7 @@ ver 0.19.7 (not yet released)
* input * input
- nfs: fix crash while canceling a failing file open operation - nfs: fix crash while canceling a failing file open operation
- nfs: fix memory leak on connection failure - nfs: fix memory leak on connection failure
- nfs: fix reconnect after mount failure
* playlist * playlist
- don't skip non-existent songs in "listplaylist" - don't skip non-existent songs in "listplaylist"
* fix memory allocator bug on Windows * fix memory allocator bug on Windows
......
...@@ -483,7 +483,7 @@ NfsConnection::OnSocketReady(unsigned flags) ...@@ -483,7 +483,7 @@ NfsConnection::OnSocketReady(unsigned flags)
DestroyContext(); DestroyContext();
closed = true; closed = true;
} else if (SocketMonitor::IsDefined() && nfs_get_fd(context) < 0) { } else if (nfs_get_fd(context) < 0) {
/* this happens when rpc_reconnect_requeue() is called /* this happens when rpc_reconnect_requeue() is called
after the connection broke, but autoreconnect was after the connection broke, but autoreconnect was
disabled - nfs_service() returns 0 */ disabled - nfs_service() returns 0 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment