mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 14:56:41 +00:00
Making getInstance call synchronized in order to avoid any problems with multiple threads using it
This commit is contained in:
1 parent
ea81c28501
commit
c2fb726912
1 file changed
+1
-1
+1
-1
@@ -29,7 +29,7 @@ public class SystemInformationImpl implements SystemInformation {
|
||||
private long allocated_tcp_connections = -1;
|
||||
private long used_tcp_connections = -1;
|
||||
|
||||
public static SystemInformation getInstance() {
|
||||
public synchronized static SystemInformation getInstance() {
|
||||
if (singleton == null)
|
||||
singleton = new SystemInformationImpl();
|
||||
return singleton;
|
||||
|
||||
Reference in new issue
Block a user