diff --git a/stream.go b/stream.go index ed06d69a..5f342793 100644 --- a/stream.go +++ b/stream.go @@ -295,6 +295,9 @@ func (s *Stream) WriteSCTP(p []byte, ppi PayloadProtocolIdentifier) (int, error) if s.association.isBlockWrite() { s.writeLock.Unlock() } + if err != nil { + n = 0 + } return n, err }