Regression from 4.3.0. It was probably caused by something unrelated we got during a vendor drop, so adding a new bug rather than reopening something random. My best guess is that it is then new IPv6 code.
What happens is that new sessions fail to start if that display number was recently used. We get this in xinit.log:
> vncext: vncExtInit: failed to bind socket: Address already in use (98)
Not sure why as we still set SO_REUSEADDR.
Found the issue. SO_REUSEADDR got moved to after bind() by mistake, which makes it rather pointless.
I have however discovered something else odd. For some reason sshd tunnels aren't leaving any TIME_WAIT around, but tlwebaccess is. I haven't been able to figure out why.
Fixed in r30260.
Can not reproduce anymore, tried logging in right after a logout using the HTML5 client, no issues.