From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Thu, 13 Nov 2014 15:43:28 +0100 From: cinap_lenrek@felloff.net To: 9fans@9fans.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Doesn't 'close' call finish pending 'read' on the same 'fd'? Topicbox-Message-UUID: 274a0e26-ead9-11e9-9d60-3106f5b1d025 the changes to implement udp hangup are trivial tho: diff -r 51564dc1adae sys/src/9/ip/udp.c --- a/sys/src/9/ip/udp.c Thu Nov 13 10:23:53 2014 +0100 +++ b/sys/src/9/ip/udp.c Thu Nov 13 15:42:24 2014 +0100 @@ -518,6 +518,11 @@ ucb = (Udpcb*)c->ptcl; if(n == 1){ + if(strcmp(f[0], "hangup") == 0){ + qhangup(c->rq, nil); + qhangup(c->wq, nil); + return nil; + } if(strcmp(f[0], "headers") == 0){ ucb->headers = 7; /* new headers format */ return nil; -- cinap