Commit b1f1f5f7 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(isc_oflush): Do nothing in ISC_STATE_CLOSING. Simplified the

	error-handling code.
parent a0fc8a90
......@@ -112,6 +112,9 @@ isc_oflush(struct isc_scb_internal *scb)
assert(scb->state != ISC_STATE_LISTENING);
if (scb->state == ISC_STATE_CLOSING)
return;
/* Data in the block buffer? */
if (scb->sendindex > 0)
{
......@@ -138,22 +141,14 @@ isc_oflush(struct isc_scb_internal *scb)
if (wlen < 0)
{
switch ( errno )
if (errno == EWOULDBLOCK)
wlen = 0;
else
{
case EWOULDBLOCK:
wlen = 0;
break;
case EPIPE:
scb->write_err_cb(&scb->pub, errno);
scb->state = ISC_STATE_CLOSING;
return;
default:
scb->write_err_cb(&scb->pub, errno);
scb->state = ISC_STATE_CLOSING;
scb->sendindex = 0;
return;
scb->write_err_cb(&scb->pub, errno);
scb->state = ISC_STATE_CLOSING;
scb->sendindex = 0;
return;
}
}
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment