Branch: Tag:

2000-06-28

2000-06-28 12:52:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Improved detection of closed connections.

Rev: NT/tools/lib.pike:1.11

203:       while(1)    { -  string s; -  sscanf(f->read(4),"%4c",int len); +  string s = f->read(4); +  if (!s) { +  werror("Connection closed!\n"); +  exit(1); +  } +  sscanf(s,"%4c",int len);    if(!len) break;    s=f->read(len);    s=replace(s,"\r\n","\n");