# Pastebin FhaBfNOZ template readSocket(r: AsyncRedis, typ: typedesc, dummyVal: expr): stmt = var line {.inject.}: TaintedString = "" if r.pipeline.enabled: let dummyValFuture = newFuture[typ]() dummyValFuture.complete(dummyVal) return dummyValFuture else: var receiveFuture = recvLine(r.socket) yield receiveFuture if receiveFuture.failed: raise receiveFuture.error line = receiveFuture.read()