X-Git-Url: http://www.dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fplaintcp.c;h=56fc81c5fb2be80b5d32240d46e8526713eb1b5c;hb=595adb9922885c2a05bc6917ee8f8f02f496e618;hp=652495567e783ac892e0280a05858344b6e6cdbf;hpb=f24b7bb50470e554202f00ca7f66b6925f473ff1;p=ashd.git diff --git a/src/plaintcp.c b/src/plaintcp.c index 6524955..56fc81c 100644 --- a/src/plaintcp.c +++ b/src/plaintcp.c @@ -150,19 +150,19 @@ void servetcp(struct muth *muth, va_list args) vavar(int, fd); vavar(struct sockaddr_storage, name); vavar(struct tcpport *, stcp); - FILE *in; + struct bufio *in; struct conn conn; struct tcpconn tcp; memset(&conn, 0, sizeof(conn)); memset(&tcp, 0, sizeof(tcp)); - in = mtstdopen(fd, 1, 60, "r+"); + in = mtbioopen(fd, 1, 60, "r+", NULL); conn.pdata = &tcp; conn.initreq = initreq; tcp.fd = fd; tcp.name = name; tcp.port = stcp; - serve(in, &conn); + serve(in, fd, &conn); } static void listenloop(struct muth *muth, va_list args) @@ -183,6 +183,8 @@ static void listenloop(struct muth *muth, va_list args) if(ns < 0) { if(errno == EAGAIN) break; + if(errno == ECONNABORTED) + continue; flog(LOG_ERR, "accept: %s", strerror(errno)); goto out; }