Closed vldalx closed 6 years ago
HeartbeatMonitor
Compare the next 2 snippets: https://github.com/AutosoftDMS/SignalR-Swift/blob/a8ded012ff2991004375e14c2de054999a1c8e51/SignalR-Swift/Client/HeartbeatMonitor.swift#L49-L50 and https://github.com/DyKnow/SignalR-ObjC/blob/c412cc38618b27c83fe170eaa9da95aa0c7eb42a/SignalR.Client/SRHeartbeatMonitor.m#L65-L68 This is the only place that the field is set to true. The same error is here https://github.com/AutosoftDMS/SignalR-Swift/blob/a8ded012ff2991004375e14c2de054999a1c8e51/SignalR-Swift/Client/HeartbeatMonitor.swift#L54-L55
true
https://github.com/AutosoftDMS/SignalR-Swift/blob/a8ded012ff2991004375e14c2de054999a1c8e51/SignalR-Swift/Client/Connection.swift#L260-L262 The problem is the unowned reference
unowned
A wrong logic in
HeartbeatMonitor
.Compare the next 2 snippets: https://github.com/AutosoftDMS/SignalR-Swift/blob/a8ded012ff2991004375e14c2de054999a1c8e51/SignalR-Swift/Client/HeartbeatMonitor.swift#L49-L50 and https://github.com/DyKnow/SignalR-ObjC/blob/c412cc38618b27c83fe170eaa9da95aa0c7eb42a/SignalR.Client/SRHeartbeatMonitor.m#L65-L68 This is the only place that the field is set to
true
. The same error is here https://github.com/AutosoftDMS/SignalR-Swift/blob/a8ded012ff2991004375e14c2de054999a1c8e51/SignalR-Swift/Client/HeartbeatMonitor.swift#L54-L55A crash.
https://github.com/AutosoftDMS/SignalR-Swift/blob/a8ded012ff2991004375e14c2de054999a1c8e51/SignalR-Swift/Client/Connection.swift#L260-L262 The problem is the
unowned
reference