Skip to content

Commit

Permalink
Missed that conn.go exists in both root and v3. :(
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmiller committed May 6, 2020
1 parent c250580 commit 24cad27
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion v3/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,12 @@ func (l *Conn) sendMessageWithFlags(packet *ber.Packet, flags sendMessageFlags)
responses: responses,
},
}
l.sendProcessMessage(message)
if !l.sendProcessMessage(message) {
if l.IsClosing() {
return nil, NewError(ErrorNetwork, errors.New("ldap: connection closed"))
}
return nil, NewError(ErrorNetwork, errors.New("ldap: could not send message for unknown reason"))
}
return message.Context, nil
}

Expand Down

0 comments on commit 24cad27

Please sign in to comment.