mirror of
https://git.robbyzambito.me/zaprus
synced 2026-05-06 14:20:37 +00:00
Fix reconnection
Was failing to reconnect due to trying to reuse the same socket that already had a BPF filter on it.
This commit is contained in:
@@ -92,7 +92,10 @@ pub fn connect(self: Client, io: Io, payload: []const u8) !SaprusConnection {
|
||||
};
|
||||
|
||||
log.debug("Setting bpf filter to port {}", .{connection.connection.src});
|
||||
try self.socket.attachSaprusPortFilter(connection.connection.src);
|
||||
self.socket.attachSaprusPortFilter(connection.connection.src) catch |err| {
|
||||
log.err("Failed to set port filter: {t}", .{err});
|
||||
return err;
|
||||
};
|
||||
log.debug("bpf set", .{});
|
||||
|
||||
var connection_buf: [2048]u8 = undefined;
|
||||
|
||||
Reference in New Issue
Block a user