mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-27 02:38:33 +02:00
v0.26.0
This commit is contained in:
@@ -10,8 +10,8 @@ import (
|
||||
var _ nettypes.Stream = (*Watcher)(nil)
|
||||
|
||||
// ListenAndServe implements nettypes.Stream.
|
||||
func (w *Watcher) ListenAndServe(ctx context.Context, predial, onRead nettypes.HookFunc) {
|
||||
w.stream.ListenAndServe(ctx, func(ctx context.Context) error { //nolint:contextcheck
|
||||
func (w *Watcher) ListenAndServe(ctx context.Context, predial, onRead nettypes.HookFunc) error {
|
||||
return w.stream.ListenAndServe(ctx, func(ctx context.Context) error {
|
||||
return w.preDial(ctx, predial)
|
||||
}, func(ctx context.Context) error {
|
||||
return w.onRead(ctx, onRead)
|
||||
|
||||
Reference in New Issue
Block a user