Fix select timeout.
Minor updates to chat example.