Prevent loop_respond() function from running if disconnecting