title: Parse Live Query: Not receiving Events on iOS Client. Our Parse server hosted on Azure App Services
body: <p><strong>Issue Description</strong></p>
  
  <p>We have hosted Parse server on Azure App Services. We are able to connect to live Query and able to Subscribe to it. We are getting below messages.</p>
  
  <p>2019-01-01 19:03:26.917094+0530 LiveQueryTest[59625:972922] ParseLiveQuery: Sending message: </p>
  
  <pre><code>{"clientKey":"xxxxxx","op":"connect","sessionToken":"","applicationId":"xxxxxx"}
  2019-01-01 19:03:27.285251+0530 LiveQueryTest[59625:972922] ParseLiveQuery: Received message: {"op":"connected","clientId":5}
  2019-01-01 19:03:27.388337+0530 LiveQueryTest[59625:972922] ParseLiveQuery: Sending message: {"query":{"className":"PostQuestionMessage","where":{"type":2}},"requestId":1,"op":"subscribe"}
  2019-01-01 19:03:27.600455+0530 LiveQueryTest[59625:972813] ParseLiveQuery: Received message: {"op":"subscribed","clientId":5,"requestId":1}
  </code></pre>
  
  <p>And we are subscribed to Update Event but when we updated any records we are not getting event Back.</p>
  
  <p>On the server:</p>
  
  <p>We tried to listen to Specific port "1337" as below: Every time we do that our Parse Dashboard and API stops working. So Is it necessary to listen to specific port i.e "1337" or var port = process.env.PORT || 1337; will also work for Live Query.</p>
  
  <pre><code>var httpServer = require('http').createServer(app);
  var port = 1337;
  httpServer.listen(port, function() {
  console.log('Parse Server running at ${port}');
  console.log("The value of port is " + port);
  });
  ParseServer.createLiveQueryServer(httpServer);
  </code></pre>
  
  <p><strong>Expected Results</strong></p>
  
  <p>We should get the event update as per our subscription.</p>
  
  <p><strong>Actual Outcome</strong></p>
  
  <p>Not receiving event updates as per the Query Subscribed,</p>
  
  <p><strong>Environment Setup</strong></p>
  
  <p>Server</p>
  
  <p>parse-server version (Be specific! Don't say 'latest'.) : [2.3.8]</p>
  
  <p>Operating System: [Linux]</p>
  
  <p>[Remote Server - Azure]</p>
  
  <p>Database</p>
  
  <p>MongoDB version: [3.4]</p>
  
  <p>[Remote Server - Azure]</p>
  
  <p><strong>Logs/Trace</strong></p>
  
  <p>Server:</p>
  
  <p>[32minfo�[39m: Parse LiveQuery Server starts running</p>
  
  <p>�[32minfo�[39m: Create new client: 1</p>
  
  <p><strong>iOS client Code:</strong></p>
  
  <pre><code>import UIKit
  import Parse
  import ParseLiveQuery
  
  class LiveQueryManager {
      static let shared = LiveQueryManager()
      var liveQueryClient = ParseLiveQuery.Client()
      var subscription: Subscription&lt;PostQuestionMessage&gt;?
      var messagesQuery: PFQuery&lt;PostQuestionMessage&gt; {
          return (PostQuestionMessage.query()?
              .whereKey("type", equalTo: 2)) as! PFQuery&lt;PostQuestionMessage&gt;
      }
      init(){
          liveQueryClient.shouldPrintWebSocketLog = true
          liveQueryClient.shouldPrintWebSocketTrace = true
      }
      fileprivate func printMessage(_ message: PostQuestionMessage) {
          let createdAt = message.createdAt ?? Date()
          print("\(createdAt) : \(message.message ?? "")")
      }
  
      func subscribeToUpdates() {
  
          //https://stackoverflow.com/questions/44273455/parse-cloud-livequeries-ios-client-doesnt-work
          self.subscription = self.liveQueryClient.subscribe(messagesQuery)
          self.subscription = self.subscription?.handleEvent({ (_, event) in
              switch event {
              case .created(let object):
                  print("Event Created")
                  self.printMessage(object)
              // do stuff
              case .updated(let object):
                  print("Event Updated")
                  self.printMessage(object)
  
              default:
                  break // do other stuff or do nothing
              }
          })
  
      }
      func disconnectFromSubscription() {
          if let objSubcription = self.subscription {
              self.liveQueryClient.unsubscribe(messagesQuery, handler: objSubcription)
          }
  
      }
      func printSubscription () {
          if let objSubscription = self.subscription {
              print ("Subscription:\(objSubscription)")
              print ("Client:\(self.liveQueryClient)")
              print ("Client userDisconnected:\(self.liveQueryClient.userDisconnected)")
          }
      }
  
  
  }
  </code></pre>