If there are persistent (keep-alive) HTTP connections, then they prevent bitcoin from shutting down.

Looking at this code again, I think this isn't the best fix-- it will only fix the problem if there is one persistent connection and that connection sends the "stop".  I'll commit a better fix shortly.