title: WebSocket Connection is not closing using SocketRocket
body: <p>I use the SocketRocket library for Objective-C to connect to a websocket:</p>
  
  <pre><code>-(void)open {
  
  if( self.webSocket ) {
      [self.webSocket close];
      self.webSocket.delegate = nil;
  }
  
  self.webSocket = [[SRWebSocket alloc] initWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"ws://192.168.0.254:5864"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:20]];
  self.webSocket.delegate = self;
  [self.webSocket open];
  }
  </code></pre>
  
  <p>Opening the connection works totally fine. The delegate is called after the connection was established.</p>
  
  <pre><code>-(void)webSocketDidOpen:(SRWebSocket *)webSocket {
  
  NSLog(@"WebSocket is open");
  
  }
  </code></pre>
  
  <p>But when I want to close the connection, nothing happens.</p>
  
  <pre><code>-(void)close {
  
  if( !self.webSocket )
      return;
  
  [self.webSocket close];
  self.webSocket.delegate = nil;
  
  }
  </code></pre>
  
  <p>The delegate for successfully closing the connection is not called. Can anyone tell me why this happens?</p>
  
  <p>Thank you for reading my question.</p>