- if(FD_ISSET(ivac->net.connection[channel].fd,&(event->rfds)))
- ivac_receive_info(channel,ivac);
- // ivac_display_content(ivac);
+ if(FD_ISSET(ivac->net.connection[channel].fd,&(event->rfds))) {
+ if(ivac_receive_info(channel,ivac)==0) {
+ event_math(ivac->net.connection[channel].fd,event,READ,REMOVE);
+ network_close(&(ivac->net),channel);
+ sprintf(c_str,"channel %02d: broken pipe - disconnected",channel);
+ ivac_add_to_monitor(ivac,c_str);
+ }
+ ivac_display_content(ivac);
+ }