Skip to content

Commit 6008929

Browse files
add decorate reader warning (miekg#1596)
The bytes read from the reader are returned to a pool and must not be changed by the decorated reader.
1 parent 07a2352 commit 6008929

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server.go

+1
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ type Server struct {
226226
// If NotifyStartedFunc is set it is called once the server has started listening.
227227
NotifyStartedFunc func()
228228
// DecorateReader is optional, allows customization of the process that reads raw DNS messages.
229+
// The decorated reader must not mutate the data read from the conn.
229230
DecorateReader DecorateReader
230231
// DecorateWriter is optional, allows customization of the process that writes raw DNS messages.
231232
DecorateWriter DecorateWriter

0 commit comments

Comments
 (0)