Not checking the connection but check that enough data was returned by `recv()`. In this case you assume that eleven bytes were returned, this might not always be the case. If it is not, there will be an `IndexError` from which the user cannot tell anything. So, you either check if there is enough data or encapsulate the call to `recv()` in a try-block. No matter how you do it, but you should then raise an _appropriate_ exception.