فهرست منبع

Tighter WriteTo rate limit

Rod Hynes 7 سال پیش
والد
کامیت
36036f80f6
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      psiphon/common/quic/quic.go

+ 1 - 1
psiphon/common/quic/quic.go

@@ -510,7 +510,7 @@ func (conn *workaroundPacketConn) WriteTo(p []byte, addr net.Addr) (int, error)
 		conn.currentMS = currentMS
 		conn.currentMS = currentMS
 		conn.callsPerMS = 0
 		conn.callsPerMS = 0
 	} else {
 	} else {
-		if conn.callsPerMS >= 10000 {
+		if conn.callsPerMS >= 100 {
 			conn.mutex.Unlock()
 			conn.mutex.Unlock()
 			return 0, common.ContextError(errors.New("rate limit exceeded"))
 			return 0, common.ContextError(errors.New("rate limit exceeded"))
 		}
 		}