diff --git a/src/Network/WebSockets/TSSocketManager.m b/src/Network/WebSockets/TSSocketManager.m index bf8845c3a..bc62759a2 100644 --- a/src/Network/WebSockets/TSSocketManager.m +++ b/src/Network/WebSockets/TSSocketManager.m @@ -205,10 +205,10 @@ NSString *const SocketConnectingNotification = @"SocketConnectingNotification"; [message setResponse:response.build]; [message setType:WebSocketMessageTypeResponse]; - @try { - [self.websocket send:message.build.data]; - } @catch (NSException *exception) { - DDLogWarn(@"Caught exception while trying to write on the socket %@", exception.debugDescription); + NSError *error; + [self.websocket sendDataNoCopy:message.build.data error:&error]; + if (error) { + DDLogWarn(@"Error while trying to write on websocket %@", error); } }