File tree 1 file changed +1
-6
lines changed
1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ public final class WebSocketClient {
61
61
public func disconnect( reason: String ? ) {
62
62
_state = . disconnecting
63
63
transport. cancel ( with: . normalClosure, reason: Data ( reason? . utf8 ?? " Closing connection " . utf8) )
64
-
65
64
}
66
65
67
66
func receiveMessagesWhileConnected( ) -> Task < Void , Error > {
@@ -72,11 +71,7 @@ public final class WebSocketClient {
72
71
try await self . transport. handle ( message)
73
72
}
74
73
} catch {
75
- logger. error ( " \( error) " )
76
- // FIXME: This should check for the error.
77
- // Also, disconnecting might already cancel the task,
78
- // but not necessarily, as a disconnected socket will
79
- // not send state changes anymore.
74
+ logger. error ( " Error in \( #function) : \( error) " )
80
75
}
81
76
logger. trace ( " WebSocketClient stopped receiving messages " )
82
77
}
You can’t perform that action at this time.
0 commit comments