In those cases the emit might cause the server to remove the connection and we are working with a dangling pointer. We can't call putChar on that, so acknowledge the message immediately and then emit the message.