Skip to content

Commit 60a9d5b

Browse files
committed
GCDAsyncUdpSocket: fixed wrong condition for all methods that can be used in performBlock:
Fixes robbiehanson#211
1 parent 3bdfab6 commit 60a9d5b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

GCD/GCDAsyncUdpSocket.m

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5094,7 +5094,7 @@ - (void)performBlock:(dispatch_block_t)block
50945094

50955095
- (int)socketFD
50965096
{
5097-
if (dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
5097+
if (! dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
50985098
{
50995099
LogWarn(@"%@: %@ - Method only available from within the context of a performBlock: invocation",
51005100
THIS_FILE, THIS_METHOD);
@@ -5109,7 +5109,7 @@ - (int)socketFD
51095109

51105110
- (int)socket4FD
51115111
{
5112-
if (dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
5112+
if (! dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
51135113
{
51145114
LogWarn(@"%@: %@ - Method only available from within the context of a performBlock: invocation",
51155115
THIS_FILE, THIS_METHOD);
@@ -5121,7 +5121,7 @@ - (int)socket4FD
51215121

51225122
- (int)socket6FD
51235123
{
5124-
if (dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
5124+
if (! dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
51255125
{
51265126
LogWarn(@"%@: %@ - Method only available from within the context of a performBlock: invocation",
51275127
THIS_FILE, THIS_METHOD);
@@ -5135,7 +5135,7 @@ - (int)socket6FD
51355135

51365136
- (CFReadStreamRef)readStream
51375137
{
5138-
if (dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
5138+
if (! dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
51395139
{
51405140
LogWarn(@"%@: %@ - Method only available from within the context of a performBlock: invocation",
51415141
THIS_FILE, THIS_METHOD);
@@ -5159,7 +5159,7 @@ - (CFReadStreamRef)readStream
51595159

51605160
- (CFWriteStreamRef)writeStream
51615161
{
5162-
if (dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
5162+
if (! dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
51635163
{
51645164
LogWarn(@"%@: %@ - Method only available from within the context of a performBlock: invocation",
51655165
THIS_FILE, THIS_METHOD);
@@ -5181,7 +5181,7 @@ - (CFWriteStreamRef)writeStream
51815181

51825182
- (BOOL)enableBackgroundingOnSockets
51835183
{
5184-
if (dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
5184+
if (! dispatch_get_specific(IsOnSocketQueueOrTargetQueueKey))
51855185
{
51865186
LogWarn(@"%@: %@ - Method only available from within the context of a performBlock: invocation",
51875187
THIS_FILE, THIS_METHOD);

0 commit comments

Comments
 (0)