Просмотр исходного кода

add comment about transitory nework ID

Adam Pritchard 1 год назад
Родитель
Сommit
05ef824d37
1 измененных файлов с 3 добавлено и 0 удалено
  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