Skip to content

Commit 70ca4b1

Browse files
author
Datanoise
committed
workaroud: reduce buffer size to not bloat clients.
1 parent a215198 commit 70ca4b1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

server/handlers_stream.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ func (s *Server) handleListener(w http.ResponseWriter, r *http.Request) {
284284
}
285285

286286
func (s *Server) serveStreamData(w http.ResponseWriter, r *http.Request, stream *relay.Stream, id, originalMount, currentMount string, recoveryTicker *time.Ticker, metaint int) bool {
287-
offset, signal := stream.Subscribe(id, 256*1024)
287+
offset, signal := stream.Subscribe(id, 128*1024)
288288
defer stream.Unsubscribe(id)
289289

290290
if stream.OggHead != nil {
@@ -294,7 +294,8 @@ func (s *Server) serveStreamData(w http.ResponseWriter, r *http.Request, stream
294294
logger.L.Debugf("Ogg Listener %s: Sending stored headers (%d bytes), then starting burst at %d", id, len(stream.OggHead), offset)
295295
}
296296

297-
buf := make([]byte, 16384)
297+
// was 16384
298+
buf := make([]byte, 4096)
298299
flusher, _ := w.(http.Flusher)
299300

300301
bytesSentSinceMeta := 0

0 commit comments

Comments
 (0)