Use non-deprecated method for sending data.

No copying required in our case since we've just built the data for only
this purpose.

// FREEBIE
pull/1/head
Michael Kirk 9 years ago
parent c1a0b88232
commit 4d52d28e06

@ -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);
}
}

Loading…
Cancel
Save