diff options
author | Samuel Stauffer <samuel@descolada.com> | 2014-03-19 22:18:21 +0100 |
---|---|---|
committer | Samuel Stauffer <samuel@descolada.com> | 2014-03-19 22:18:21 +0100 |
commit | 706c1cdc687158e370b72181f3a0e88f5156309b (patch) | |
tree | 17c4e74628a070d692655add20ee513ac5ab5a71 /conn.go | |
parent | Remove newlines from log messages (diff) | |
download | ldap-706c1cdc687158e370b72181f3a0e88f5156309b.tar ldap-706c1cdc687158e370b72181f3a0e88f5156309b.tar.gz ldap-706c1cdc687158e370b72181f3a0e88f5156309b.tar.bz2 ldap-706c1cdc687158e370b72181f3a0e88f5156309b.tar.lz ldap-706c1cdc687158e370b72181f3a0e88f5156309b.tar.xz ldap-706c1cdc687158e370b72181f3a0e88f5156309b.tar.zst ldap-706c1cdc687158e370b72181f3a0e88f5156309b.zip |
Diffstat (limited to '')
-rw-r--r-- | conn.go | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -226,18 +226,11 @@ func (l *Conn) processMessages() { l.chanResults[messagePacket.MessageID] = messagePacket.Channel // go routine buf := messagePacket.Packet.Bytes() - for len(buf) > 0 { - n, err := l.conn.Write(buf) - if err != nil { - l.Debug.Printf("Error Sending Message: %s", err.Error()) - break - } - // nothing else to send - if n == len(buf) { - break - } - // the remaining buf content - buf = buf[n:] + + _, err := l.conn.Write(buf) + if err != nil { + l.Debug.Printf("Error Sending Message: %s", err.Error()) + break } case MessageResponse: l.Debug.Printf("Receiving message %d", messagePacket.MessageID) |