If mosquitto fails to open the last socket in it's loop, it aborts

Bug #741380 reported by Yuvraaj Kelkar
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
mosquitto
Fix Released
Undecided
Roger Light

Bug Description

The fix for the last bug I reported (ipv6 socket failure) introduced a different bug: The last few lines in the function "mqtt3_socket_listen" are:
if(sock >= 0){
    return 0;
}else{
   return 1;
}

This causes mosquitto to exit if the last socket open fails. I think the expected logic is to fail if not even one socket open succeeds. The change I'm requesting is
<code>
    // We need to have at least one working socket
    if(*sock_count > 0){
        return 0;
    }else{
        return 1;
    }
</code>

Revision history for this message
Roger Light (roger.light) wrote :

Ah yes.

Thanks for the patch, I'll put it in.

Changed in mosquitto:
assignee: nobody → Roger Light (roger.light)
status: New → Confirmed
Revision history for this message
Roger Light (roger.light) wrote :
Changed in mosquitto:
status: Confirmed → Fix Committed
Changed in mosquitto:
status: Fix Committed → Triaged
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.