--- libraries/libldap/sasl.c 2009/10/26 22:36:39 1.76 +++ libraries/libldap/sasl.c 2009/10/26 22:52:55 1.77 @@ -1,4 +1,4 @@ -/* $OpenLDAP: pkg/ldap/libraries/libldap/sasl.c,v 1.75 2009/10/26 18:19:20 hyc Exp $ */ +/* $OpenLDAP: pkg/ldap/libraries/libldap/sasl.c,v 1.76 2009/10/26 22:36:39 hyc Exp $ */ /* This work is part of OpenLDAP Software . * * Copyright 1998-2009 The OpenLDAP Foundation. @@ -728,7 +728,7 @@ sb_sasl_generic_write( Sockbuf_IO_Desc * /* error? */ int err = sock_errno(); /* caller can retry this */ - if ( err == EAGAIN ) + if ( err == EAGAIN || errno == EWOULDBLOCK || errno == EINTR ) p->flags |= LDAP_PVT_SASL_PARTIAL_WRITE; return ret; } else if ( p->buf_out.buf_ptr != p->buf_out.buf_end ) {