Skip to content

Commit 3bcb2d6

Browse files
committed
NSURLSession: improve protocol detection
1 parent 654e2c0 commit 3bcb2d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/NSURLSession.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,9 +992,10 @@ - (instancetype) initWithSession: (NSURLSession*)session
992992
if ([protocolClass canInitWithRequest: request])
993993
{
994994
_protocolClass = protocolClass;
995+
break;
995996
}
996997
}
997-
NSAssert(nil != _protocolClass, @"Unsupported protocol");
998+
NSAssert(nil != _protocolClass, @"Unsupported protocol for request: %@", request);
998999
}
9991000

10001001
return self;

0 commit comments

Comments
 (0)