BrokenPipe is now considered as a disconnection.

This commit is contained in:
Philippe Pittoli 2023-05-15 09:21:02 +02:00
parent bc4c54f624
commit 5807ea51bd

View File

@ -505,7 +505,7 @@ pub const Context = struct {
error.BrokenPipe => { error.BrokenPipe => {
log.warn("cannot send message, dest probably closed the connection ({})", .{err}); log.warn("cannot send message, dest probably closed the connection ({})", .{err});
try self.close(i); try self.close(i);
return Event.init(Event.Type.ERROR, i, fd.fd, null); return Event.init(Event.Type.DISCONNECTION, i, fd.fd, null);
}, },
else => { else => {
log.warn("unmanaged error while sending a message ({})", .{err}); log.warn("unmanaged error while sending a message ({})", .{err});