aboutsummaryrefslogtreecommitdiff
path: root/hotline/tracker.go
diff options
context:
space:
mode:
Diffstat (limited to 'hotline/tracker.go')
-rw-r--r--hotline/tracker.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/hotline/tracker.go b/hotline/tracker.go
index ee4fc05..212238d 100644
--- a/hotline/tracker.go
+++ b/hotline/tracker.go
@@ -43,14 +43,7 @@ func (tr *TrackerRegistration) Read(p []byte) (int, error) {
[]byte(tr.Password),
)
- if tr.readOffset >= len(buf) {
- return 0, io.EOF // All bytes have been read
- }
-
- n := copy(p, buf[tr.readOffset:])
- tr.readOffset += n
-
- return n, nil
+ return readFrom(p, &tr.readOffset, buf)
}
// Dialer interface to abstract the dialing operation