Skip to content

Commit

Permalink
Merge pull request #6 from hideakitai/fix_blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackPhlox authored Jan 11, 2022
2 parents 380d1cf + 7d87756 commit 0fd580b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ fn osc_listener_update(
mut log: ResMut<OscLog>,
mut osc_events: EventWriter<OscEvent>,
) {
for (packet, addr) in rec.receiver.recv().iter() {
for (packet, addr) in rec.receiver.try_iter() {
if log.received_packets.len() > settings.max_log_packets {
log.received_packets.remove(0);
}

let address = *addr;
let address = addr;

log.received_packets.push((address, packet.clone()));

Expand Down

0 comments on commit 0fd580b

Please sign in to comment.