acmacalister / jetfire

WebSocket (RFC 6455) client library for iOS & OS X
Apache License 2.0
518 stars 83 forks source link

How to get more disconnect information #92

Open muraviovvladimir opened 3 years ago

muraviovvladimir commented 3 years ago

This how Change JFRWebSocket.m line 390 to 397 with

if(status == NO) { [self doDisconnect: [self errorWithDetail:@"Invalid HTTP upgrade" code:1 userInfo: @{ @"HTTPResponseStatusCode" : @(responseStatusCode), @"HTTPResponseBuffer" : [NSString stringWithFormat:@"%s",buffer] } ] ]; }

Than you'll be able to read from [error userInfo] -> HTTPResponseBuffer even if you turn off debug mode