Inconsistent synchronization fix for UiWebSocket.connection

Change-Id: I098c5765c89f5885df54578c624ff80fb67727b8
diff --git a/web/gui/src/main/java/org/onosproject/ui/impl/UiWebSocket.java b/web/gui/src/main/java/org/onosproject/ui/impl/UiWebSocket.java
index 1b6f7f9..1d49d02 100644
--- a/web/gui/src/main/java/org/onosproject/ui/impl/UiWebSocket.java
+++ b/web/gui/src/main/java/org/onosproject/ui/impl/UiWebSocket.java
@@ -103,7 +103,7 @@
     }
 
     @Override
-    public void onOpen(Connection connection) {
+    public synchronized void onOpen(Connection connection) {
         this.connection = connection;
         this.control = (FrameConnection) connection;
         try {