Skip to content

Commit 94668cf

Browse files
committed
Removed assertion failure when poll() on invalid socket
This is a valid error condition that can be hit when, for example, connect() is called and returned error. The socket is in an invalid state but this assertion failure crashes the app before proper error handling can be done elsewhere.
1 parent 251d781 commit 94668cf

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Sources/Socket/SocketManager.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@ extension SocketManager.ManagerState {
257257
shouldRead(poll.socket)
258258
}
259259
if poll.returnedEvents.contains(.invalidRequest) {
260-
assertionFailure("Polled for invalid socket \(poll.socket)")
261260
error(.badFileDescriptor, for: poll.socket)
262261
}
263262
if poll.returnedEvents.contains(.hangup) {

0 commit comments

Comments
 (0)