B4J Question asyncStreamText Client Abnormal Disconnect

Addo

Well-Known Member
Licensed User
Longtime User
i am using asyncstreamText as a tcp server it works pretty fine so far

but i am Curios to know why when client connection lost the server raise this exception ?


java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at java.net.SocketInputStream.read(SocketInputStream.java:127)
at anywheresoftware.b4a.randomaccessfile.AsyncStreams$AIN.run(AsyncStreams.java:199)
at java.lang.Thread.run(Thread.java:748)


i already handle the astream termination sub

B4X:
Private Sub AStream_Terminated
    AStream_Error
End Sub

Private Sub AStream_Error

Aserver.ClientDisconnected(Me)

astream.Close
    
    
End Sub


where i can catch this error exactly ?
 
Top