Comments (9)
Which version are you using, on which framework and how are you configuring the component?
I have never seen anything like that before.
from websocketlistener.
2.1.3 as a Xamarin PCL project...IOS and Android.
Listener works fine, and so does plain WebSocket...except for the fact the underlying TCP connection closes @ ~3:20 without generating any notification. The Websocket object continues to report Open, but the socket is closed and disposed.
from websocketlistener.
also, this is a pull from git, not the nuget package. It was necessary to use the default buffer, not buffer manager, and remove some of the .Net logging statements to get it to compile for PCL IOS and Android. Neither of those mods were otherwise significant.
from websocketlistener.
2.1.6 pull compiles without mods. But it still closes the underlying socket.
Tried engaging the server with a stimulus/response exchange of a couple of bytes every 30 seconds, but this had no effect. Neither did setting KeepAlive to 30 seconds.
from websocketlistener.
What happens when the socket is closed and you try to send something? Does it throw an exception?
from websocketlistener.
2015-04-14 15:47:40.023 1Dir.iOS[9550:2937900] Exception: System.ObjectDisposedException: The object was used after being disposed.
at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00016] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.9.1.3/src/mono/mcs/class/System/System.Net.Sockets/Socket.cs:1827
at System.Net.WebSockets.ClientWebSocket+c__AnonStorey4.<>m__0 () [0x0007a] in ///Library/Frameworks/Xamarin.iOS.framework/Versions/8.9.1.3/src/mono/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs:197
at System.Threading.Tasks.TaskActionInvoker+ActionInvoke.Invoke (System.Threading.Tasks.Task owner, System.Object state, System.Threading.Tasks.Task context) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/TaskActionInvoker.cs:71
at System.Threading.Tasks.Task.InnerInvoke () [0x00031] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:548
at System.Threading.Tasks.Task.ThreadStart () [0x000d0] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Threading.Tasks/Task.cs:438
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs:60
at Dir.iOS.WSServer+c__async5.MoveNext () [0x00072] in /Users/MacOwner/Xamarin Projects/1Dir/iOS/WSServer.cs:410
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:62
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00034] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.CompilerServices/TaskAwaiter.cs:60
at Dir.iOS.WSServer+c__async2.MoveNext () [0x00147] in /Users/MacOwner/Xamarin Projects/1Dir/iOS/WSServer.cs:313
2015-04-14 15:47:40.024 1Dir.iOS[9550:2937870] Reconnecting...
Reconnecting...
2015-04-14 15:47:40.609 1Dir.iOS[9550:2937495] The object was used after being disposed.
The object was used after being disposed.
2015-04-14 15:47:40.610 1Dir.iOS[9550:2937495] Relay server socket is Closed!
from websocketlistener.
That was a yes. We've tested and know the server is not terminating. And no
Close request is ever recieved. Breaking inside the while state.open loop shows the underlying socket is gone. An AsyncSend provokes the exception.
from websocketlistener.
Humm.. I will improve the connection detection mechanism, but the reason why is disconnecting after 3m 20s... I have no idea.
from websocketlistener.
Sorry that exception with stack trace you posted, is coming from the built-in client in the framework (System.Net.WebSockets.ClientWebSocket), no from WebSocketListener. Do you get any exception in WebSocketListener?
from websocketlistener.
Related Issues (20)
- I am trying to upgrade from V2.2.0.1 to V3.0.0 but it errors out. HOT 5
- Does WebSocketListener work with the HoloLens (UWP)? HOT 1
- V3.0.0 does not work with Mono v4.6.2 HOT 3
- How to bypass CORS? HOT 1
- IOException Issues Randomly HOT 1
- IE Origin HOT 2
- WSS Configuration HOT 2
- On quick client disconnect, ObjectDisposedException being thrown HOT 1
- WebSocketMessageReadNetworkStream can only start with a Text or Binary frame, not Continuation HOT 2
- WebSocketHandshaker.ParseWebSocketProtocol throws a NullReferenceException HOT 1
- Server does not detect broken link on linux
- TLS 1.2 is not supported HOT 1
- Cannot understand frame header exception when receiving messages from Javascript HOT 5
- SSL Deserialize Message not working HOT 4
- How to use OnHttpNegotiation in 3.0.0
- Is there a sample including Authentication? HOT 1
- Some Information about Client HOT 1
- Try to Secure WebSocket: Unknow error while processing the certificate
- Is WebSocketListener good enough out of the box for video streaming? HOT 2
- Websocket Listener is able to accept incoming data from Client but Websocket Listener thinks connection with client is closed. HOT 1
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 websocketlistener.