Skip to content

Commit

Permalink
Move updating.
Browse files Browse the repository at this point in the history
  • Loading branch information
Extollite committed Oct 17, 2020
1 parent c523e00 commit 3b80d7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/RakNetSwift/Connection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ public class Connection {
}

func recieve(_ buf : inout ByteBuffer){
self.lastUpdate = Int64(NSDate().timeIntervalSince1970 * 1000)
let header = buf.readInteger(as: UInt8.self)!
buf.moveReaderIndex(to: 0)
let datagram = (header & Flags.FLAG_VALID) != 0
Expand Down Expand Up @@ -225,6 +224,7 @@ public class Connection {
}

func handleDatagram(_ buf : inout ByteBuffer){
self.lastUpdate = Int64(NSDate().timeIntervalSince1970 * 1000)
let packet = Datagram()
packet.decode(&buf)
if(packet.sequenceNumber < self.windowStart || packet.sequenceNumber > self.windowEnd || self.recievedWindow.contains(Int32(packet.sequenceNumber))) {
Expand Down

0 comments on commit 3b80d7c

Please sign in to comment.