Skip to content

Commit

Permalink
director: Fix potential panic when director is alone
Browse files Browse the repository at this point in the history
If director is alone and it can't connect to other directors, it might crash
with:

Panic: file director.c: line 318 (director_set_ring_synced): assertion failed: (!dir->ring_synced)
  • Loading branch information
sirainen committed Oct 5, 2017
1 parent 057a709 commit 0de04d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/director/director.c
Expand Up @@ -276,7 +276,7 @@ void director_connect(struct director *dir, const char *reason)
dir->ring_min_version = DIRECTOR_VERSION_MINOR;
if (!dir->ring_handshaked)
director_set_ring_handshaked(dir);
else
else if (!dir->ring_synced)
director_set_ring_synced(dir);
}

Expand Down

0 comments on commit 0de04d7

Please sign in to comment.