diff --git a/Creating a WebSocket Chat with Ktor/05_creating_the_chat_client.md b/Creating a WebSocket Chat with Ktor/05_creating_the_chat_client.md index 3a9ca0a..b984f76 100644 --- a/Creating a WebSocket Chat with Ktor/05_creating_the_chat_client.md +++ b/Creating a WebSocket Chat with Ktor/05_creating_the_chat_client.md @@ -73,7 +73,7 @@ suspend fun DefaultClientWebSocketSession.inputMessages() { try { send(message) } catch (e: Exception) { - println("Error while sending: " + e.localizedMessage) + e as? CancellationException ?: println("Error while receiving: " + e.localizedMessage) return } }