Preventing crash on close stream

BlitzMax Forums/BlitzMax Programming/Preventing crash on close stream

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Can you not detect the stream closing with Eof(clientStream) ?

EG:

If Not(clientStream.Eof())
   clientStream.writeBytes(bytes , read)
Else
   clientStream.Close()
   GoDoSomethingElse()
End If