glx: fix shutdown hang