Skip to content

Commit

Permalink
NSURLSession: improve protocol detection
Browse files Browse the repository at this point in the history
  • Loading branch information
triplef committed Jan 16, 2023
1 parent 654e2c0 commit 3bcb2d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/NSURLSession.m
Original file line number Diff line number Diff line change
Expand Up @@ -992,9 +992,10 @@ - (instancetype) initWithSession: (NSURLSession*)session
if ([protocolClass canInitWithRequest: request])
{
_protocolClass = protocolClass;
break;
}
}
NSAssert(nil != _protocolClass, @"Unsupported protocol");
NSAssert(nil != _protocolClass, @"Unsupported protocol for request: %@", request);
}

return self;
Expand Down

0 comments on commit 3bcb2d6

Please sign in to comment.