Browse Source

Adds some comments

Manu Mtz.-Almeida 10 years ago
parent
commit
ee05b128a7
1 changed files with 1 additions and 0 deletions
  1. 1 0
      sse-decoder.go

+ 1 - 0
sse-decoder.go

@@ -109,6 +109,7 @@ func (d *decoder) decode(r io.Reader) ([]Event, error) {
 			continue
 			continue
 		}
 		}
 	}
 	}
+	// Once the end of the file is reached, the user agent must dispatch the event one final time.
 	d.dispatchEvent(currentEvent, dataBuffer.String())
 	d.dispatchEvent(currentEvent, dataBuffer.String())
 
 
 	return d.events, nil
 	return d.events, nil