summaryrefslogtreecommitdiffhomepage
path: root/conn
diff options
context:
space:
mode:
Diffstat (limited to 'conn')
-rw-r--r--conn/bind_windows.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/conn/bind_windows.go b/conn/bind_windows.go
index 6cabee1..a25c7aa 100644
--- a/conn/bind_windows.go
+++ b/conn/bind_windows.go
@@ -47,7 +47,7 @@ func (rb *ringBuffer) Push() *ringPacket {
}
ret := (*ringPacket)(unsafe.Pointer(rb.packets + (uintptr(rb.tail%packetsPerRing) * unsafe.Sizeof(ringPacket{}))))
rb.tail += 1
- if rb.tail == rb.head {
+ if rb.tail%packetsPerRing == rb.head%packetsPerRing {
rb.isFull = true
}
return ret