Avoid dead loop for xcb_poll_for_reply if xcb connection is dead.
Check the returned error and break if error happens.