Parcourir la source

add comment about transitory nework ID

Adam Pritchard il y a 1 an
Parent
commit
05ef824d37
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      psiphon/common/networkid/networkid_windows.go

+ 3 - 0
psiphon/common/networkid/networkid_windows.go

@@ -243,6 +243,9 @@ var workThread struct {
 
 // Get returns the compound network ID; see [psiphon.NetworkIDGetter] for details.
 // This function is safe to call concurrently from multiple goroutines.
+// Note that if this function is called immediately after a network change (within ~100ms)
+// a transitory Network ID may be returned that will change on the next call. The caller
+// may wish to delay responding to a new Network ID until the value is confirmed.
 func Get() (string, error) {
 	// It is not clear if the COM NetworkListManager calls are threadsafe. We're using them
 	// read-only and they're probably fine, but we're not sure. Additionally, our networkID