The previous check referred to a variable which was used only for
initializing the fd set and wasn't meaningful in the context of the
invalidity check.

Signed-off-by: Tuomas Räsänen <[email protected]>
---
 nbd-server.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nbd-server.c b/nbd-server.c
index 6c80599..f3c78bd 100644
--- a/nbd-server.c
+++ b/nbd-server.c
@@ -2450,7 +2450,7 @@ void serveloop(GArray* servers) {
                                SERVER *serve;
 
                                serve=&(g_array_index(servers, SERVER, i));
-                               if(sock < 0) {
+                               if(serve->socket < 0) {
                                        continue;
                                }
                                if(FD_ISSET(serve->socket, &rset)) {
-- 
1.7.10.4


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general

Reply via email to