zwopple / PocketSocket

Objective-C websocket library for building things that work in realtime on iOS and OS X.
Other
414 stars 129 forks source link

Socket not opening(evaluateServerTrust method won't return anything) #82

Open pothinenikarthik-plivo opened 5 years ago

pothinenikarthik-plivo commented 5 years ago

We included Pocketsocket.a file inside our objective c framework. The socket connection is not opening sometimes. We debugged inside PocketSocket code, we found that evaluateServerTrust method is called in a synchronous way by executeDelegateAndWait. PocketSocket code: [self executeDelegateAndWait:^{ customTrustEvaluation = [_delegate respondsToSelector:@selector(webSocket:evaluateServerTrust:)]; }];

We changed synchronous to asynchronous by calling executeDelegate and everything worked fine. What is the reason in calling evaluateServerTrust method in a synchronous way?