Hacker News new | past | comments | ask | show | jobs | submit login

Something seems off on the second code example under "Safely Reusing Ports". `s.connect()` is inside the try/except block, which is great, except that both cases in the `except` re-raise something, which means the loop will only ever execute once. Am I misreading that?

Not that that takes anything away from the functionality, of course. CloudFlare is great and I'm excited to see that they're offering web socket support.




Thanks for pointing that out. It's a problem with the indentation of the pseudo-Python code in our blog editor. I've fixed it.


Thanks! Now it makes much more sense.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: