getlantern/lantern#1895 Fixed non-terminating close condition