fix race condition around connection count getting
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
f82c2f9da4
commit
2fd0aa67bd
|
@ -136,6 +136,8 @@ func (ra *RicochetApplication) Close(onion string) {
|
||||||
|
|
||||||
// ConnectionCount returns the number of concurrent connections to the application
|
// ConnectionCount returns the number of concurrent connections to the application
|
||||||
func (ra *RicochetApplication) ConnectionCount() int {
|
func (ra *RicochetApplication) ConnectionCount() int {
|
||||||
|
ra.lock.Lock()
|
||||||
|
defer ra.lock.Unlock()
|
||||||
return len(ra.instances)
|
return len(ra.instances)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue