Closed enricogior closed 6 years ago
This line: https://github.com/thaliproject/thali-ios/blob/5c5a475a5afa258e6aa098edb581ff97724ff221/ThaliCore/SocketConnection/AdvertiserRelay.swift#L46 can cause a dead-lock if the else condition is executed. I didn't spend time to investigate if it's a Swift bug or a code bug, but there is a simple way to avoid the problem in the first place.
else
This line can also cause a dead-lock if an error occurs while reading form the stream: https://github.com/thaliproject/thali-ios/blob/5c5a475a5afa258e6aa098edb581ff97724ff221/ThaliCore/SocketConnection/AdvertiserRelay.swift#L114 The fix is trivial.
Fixed in https://github.com/thaliproject/thali-ios/commits/master-enrico-error-handling-tmp
This line: https://github.com/thaliproject/thali-ios/blob/5c5a475a5afa258e6aa098edb581ff97724ff221/ThaliCore/SocketConnection/AdvertiserRelay.swift#L46 can cause a dead-lock if the
else
condition is executed. I didn't spend time to investigate if it's a Swift bug or a code bug, but there is a simple way to avoid the problem in the first place.This line can also cause a dead-lock if an error occurs while reading form the stream: https://github.com/thaliproject/thali-ios/blob/5c5a475a5afa258e6aa098edb581ff97724ff221/ThaliCore/SocketConnection/AdvertiserRelay.swift#L114 The fix is trivial.