On Tue, 2014-12-30 at 10:09 +0000, Paul Newall wrote: > I have been digging down into the code, and adding extra debug output. > In my network read function kodakaio_net_read it seems that poll(...) is > indicating that there is data to read, but sanei_ tcp_read(..) then > returns zero bytes. > If there was no data I'd expect poll to timeout, and if there was some > data, sanei_ tcp_read should return it? > But this is the only network read code I have ever written in c so I am > not too confident it is correct. > > Paul A read returning 0 bytes when the fd is ready indicates that the other side closed the TCP-connection. you probably need to send some form of keep-alive or close/ the connection when you don't need it and re-open the connection later. Louis
-- sane-devel mailing list: [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel Unsubscribe: Send mail with subject "unsubscribe your_password" to [email protected]
