mirror of
https://github.com/jech/galene.git
synced 2024-11-09 18:25:58 +01:00
Write out disk writer packets unconditionally.
If the stream was very short, we may not have created a writer yet. Write out packets even in that case.
This commit is contained in:
parent
e8fbfcb9ba
commit
0cbfa7b0ca
1 changed files with 2 additions and 2 deletions
|
@ -184,8 +184,8 @@ func (conn *diskConn) warn(message string) {
|
|||
// called locked
|
||||
func (conn *diskConn) reopen(extension string) error {
|
||||
for _, t := range conn.tracks {
|
||||
if t.writer != nil {
|
||||
t.writeBuffered(true)
|
||||
if t.writer != nil {
|
||||
t.writer.Close()
|
||||
t.writer = nil
|
||||
}
|
||||
|
@ -207,8 +207,8 @@ func (conn *diskConn) Close() error {
|
|||
conn.mu.Lock()
|
||||
tracks := make([]*diskTrack, 0, len(conn.tracks))
|
||||
for _, t := range conn.tracks {
|
||||
if t.writer != nil {
|
||||
t.writeBuffered(true)
|
||||
if t.writer != nil {
|
||||
t.writer.Close()
|
||||
t.writer = nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue