             reqPolling.allHTTPHeaderFields = headers
         }
  
-        if extraHeaders != nil {
-            for (headerName, value) in extraHeaders! {
+        if let extraHeaders = extraHeaders {
+            for (headerName, value) in extraHeaders {
                 reqPolling.setValue(value, forHTTPHeaderField: headerName)
             }
         }


            ws?.writeString("\(type.rawValue)\(str)")

            if datas != nil {
                for data in datas! {
                    let (data, _) = createBinaryDataForSend(data)
                    if data != nil {
                        ws?.writeData(data!)


            postWait.append(strMsg)

            if let datas = datas {
                for data in datas {
                    let (_, b64Data) = createBinaryDataForSend(data)

                    postWait.append(b64Data!)
