// fdstestr : fdset;\r
// fdstestw : fdset;\r
begin\r
- if state <> wsconnected then exit;\r
+ if state <> wsconnected then begin\r
+ result := -1;\r
+ exit;\r
+ end;\r
\r
lensent := sendq.get(data,packetbasesize*2);\r
if assigned(data) then result := myfdwrite(fdhandleout,data^,lensent) else result := 0;\r