Comments (7)
@panthesingh Do you have an example case you can upload that exhibits this issue? The fact it's passing all of the autobahn tests and I just tested it myself and it closes connections just fine is peculiar.
What makes you believe it's not closing the connections? Is it not sending a delegate message or is the server not getting a notification that it's been closed?
Also are you immediately destroying the PSWebSocket instance while the close command is sent? Unlike SocketRocket PSWebSocket does not retain itself while the connection is open so if you dealloc it immediately after calling close it will drop the socket connection likely before the close command is transported.
If the connection is dropped unexpectedly the other end normally wont know until it attempts to write another message.
from pocketsocket.
@panthesingh Can you provide a full example of your Objective-C class? Still hard to tell if you're potentially deallocing the PSWebSocket instance.
from pocketsocket.
By default I thought unless you specify a storage strength @properties are assign
which would mean the instance is getting immediately deallocated potentially. I could be wrong here though.
Can you change @property (nonatomic)
to @property (strong, nonatomic)
and see if it helps? If not I'll dig into this a bit more later today.
from pocketsocket.
Hey @panthesingh
If you could zip up and send your sample project to robert[at]zwopple[dot]com that would be amazing.
The run loop should never get cleaned up, it's shared across all PSWebSocket instances and never gets removed.
from pocketsocket.
@panthesingh Ok can confirm it's not closing properly. So strange as the Autobahn tests are passing 100%.. will dig into it a bit further in regards to the websocket RFC and see if it's the client or server that is being fishy.
from pocketsocket.
@panthesingh This is now resolved in master. It was a really simple fix. Also in addition to sending the close to the server it will enforce a 30 second limit after which the client will forcefully drop the socket connection.
from pocketsocket.
Given it was an exec bad access the run loop was getting dealloced somehow, to hopefully prevent it I stored a strong reference to the run loop and that should hopefully resolve it.
If it still ever crashes let me know
from pocketsocket.
Related Issues (20)
- Deadlock or crash in -[PSWebSocket dealloc] HOT 3
- 'Server mode should have already opened streams.' HOT 1
- Constant "Output stream end encountered" on server HOT 15
- How to do with this error? HOT 2
- WS Secure server: CFNetwork SSLHandshake failed (-9806) HOT 5
- App Crashes on No Internet Connection
- Can't access websockets server on device HOT 3
- Not working? HOT 4
- PocketSocket Delegate is not calling when app is in background HOT 1
- Get IP address from PSWebSocket HOT 3
- support connection timeout?
- Capitalize the 'Connection'='upgrade' header in request
- Server limited to ~0.5MB/s per socket HOT 1
- Capitalize system library in podspec
- How to check socket connection is closed in client?
- tvOS Support
- Block implicitly retains 'self' warnings on Xcode 9
- PocketSocket does not link on Xcode 10.1
- Socket not opening(evaluateServerTrust method won't return anything)
- 我想问一下,是否支持HTTPS ? 使用WSS?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pocketsocket.