pub fn getReadError(c: *const Connection) ?ReadError c: *const Connection387
388
389
390
391
392
393
394
395
396
397
398 pub fn getReadError(c: *const Connection) ?ReadError {
return switch (c.protocol) {
.tls => {
if (disable_tls) unreachable;
const tls: *const Tls = @alignCast(@fieldParentPtr("connection", c));
return tls.client.read_err orelse c.stream_reader.err.?;
},
.plain => {
return c.stream_reader.err.?;
},
};
}