             Logger.debug(type: .webSocketChannel, message: "\(data)")
             naviveMessage = .data(data)
         }
-        webSocketTask!.send(naviveMessage) { error in
+        webSocketTask!.send(naviveMessage) { [weak self] error in
+            guard let weakSelf = self else {
+                return
+            }
             if let error = error {
                 Logger.debug(type: .webSocketChannel, message: "failed to send message")
-                self.disconnect(error: error)
+                weakSelf.disconnect(error: error)
             }
         }
     }
     
     func receive() {
-        webSocketTask?.receive { result in
+        webSocketTask?.receive { [weak self] result in
+            guard let weakSelf = self else {
+                return
+            }
+
             switch result {
             case .success(let message):
                 Logger.debug(type: .webSocketChannel, message: "receive message => \(message)")

            
            state = .disconnecting
            webSocketTask?.cancel(with: .normalClosure, reason: nil)
            state = .disconnected
            
            Logger.debug(type: .webSocketChannel, message: "call onDisconnect")

                
                if let message = newMessage {
                    Logger.debug(type: .webSocketChannel, message: "call onReceive")
                    weakSelf.channel.internalHandlers.onReceive?(message)
                    weakSelf.channel.handlers.onReceive?(message)
                } else {
                    Logger.debug(type: .webSocketChannel,
                              message: "received message is not string or binary (discarded)")
                    // discard
                }
                
                weakSelf.receive()
                
            case .failure(let error):
                Logger.debug(type: .webSocketChannel,
                             message: "failed to receive error => \(error.localizedDescription)")
                weakSelf.disconnect(error: error)
            }
        }
    }
