Added volatile in SocketCommunication