fixed crash when checking if socket is connected while it nil
fixed crash when checking if socket is connected while it nil

hamin/FayeSwift,shshalom/FayeSwift,hamin/FayeSwift,hamin/FayeSwift,shshalom/FayeSwift,hamin/FayeSwift,shshalom/FayeSwift,hamin/FayeSwift,shshalom/FayeSwift,shshalom/FayeSwift