Remove done TODOs.
parent
54fc5aa9e0
commit
1b19118701
|
@ -385,16 +385,15 @@ pub const Context = struct {
|
||||||
}
|
}
|
||||||
// otherwise = new message or disconnection
|
// otherwise = new message or disconnection
|
||||||
else {
|
else {
|
||||||
// TODO: handle incoming message
|
|
||||||
// TODO: handle_new_message
|
|
||||||
var maybe_message = self.read(i) catch |err| switch(err) {
|
var maybe_message = self.read(i) catch |err| switch(err) {
|
||||||
error.ConnectionResetByPeer => {
|
error.ConnectionResetByPeer => {
|
||||||
print("connection reset by peer\n", .{});
|
print("connection reset by peer\n", .{});
|
||||||
try self.close(i);
|
try self.close(i);
|
||||||
return Event.init(Event.Type.DISCONNECTION, i, fd.fd, null);
|
return Event.init(Event.Type.DISCONNECTION, i, fd.fd, null);
|
||||||
},
|
},
|
||||||
else => { return err; },
|
else => { return err; },
|
||||||
};
|
};
|
||||||
|
|
||||||
if (maybe_message) |m| {
|
if (maybe_message) |m| {
|
||||||
if (m.t == .LOOKUP) {
|
if (m.t == .LOOKUP) {
|
||||||
return Event.init(Event.Type.LOOKUP, i, fd.fd, m);
|
return Event.init(Event.Type.LOOKUP, i, fd.fd, m);
|
||||||
|
|
Reference in New Issue