func (buffer *Buffer) Close() {
	buffer.Lock()
	defer buffer.Unlock()

	if buffer.closed {
		return
	}

	buffer.closed = true

	buffer.flushCondition.Broadcast()
}
// Close stops the buffering of packets
Close stops the buffering of packets
// Close stops the buffering of packets
func (buffer *Buffer) Close() {
	buffer.Lock()
	defer buffer.Unlock()
	if buffer.closed {
		return
	}
	buffer.closed = true
	buffer.flushCondition.Broadcast()
}
func ( buffer * Buffer ) Close ( ) { buffer . Lock ( ) defer buffer . Unlock ( ) if buffer . closed { return } buffer . closed = true buffer . flushCondition . Broadcast ( ) }
Close stops the buffering of packets
Close stops the buffering of packets