Skip to content

Commit 4d47182

Browse files
committed
use wrappedOnClose for error handling in NewConnectionEx and NewPacketConnectionEx
1 parent a3a9fc3 commit 4d47182

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

protocol/group/mutableselector.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func (s *MutableSelector) NewConnectionEx(ctx context.Context, conn net.Conn, me
254254
if selected == nil {
255255
err := errors.New("no outbound available")
256256
s.logger.ErrorContext(ctx, err)
257-
onClose(err)
257+
wrappedOnClose(err)
258258
return
259259
}
260260
if handler, isHandler := selected.(A.ConnectionHandlerEx); isHandler {
@@ -284,7 +284,7 @@ func (s *MutableSelector) NewPacketConnectionEx(ctx context.Context, conn networ
284284
if selected == nil {
285285
err := errors.New("no outbound available")
286286
s.logger.ErrorContext(ctx, err)
287-
onClose(err)
287+
wrappedOnClose(err)
288288
return
289289
}
290290
if handler, isHandler := selected.(A.PacketConnectionHandlerEx); isHandler {

0 commit comments

Comments
 (0)