Commit d2a32e4 1 parent d6d2d3e commit d2a32e4 Copy full SHA for d2a32e4
File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,8 @@ class DataProxyConnect: DataProxy {
52
52
}
53
53
54
54
func startServer( ) {
55
+ assertDispatchQueue ( DispatchQueue . main)
56
+
55
57
//Ignore if we're already connecting or connected
56
58
guard !isActive else { return }
57
59
@@ -89,6 +91,8 @@ class DataProxyConnect: DataProxy {
89
91
}
90
92
91
93
func stopServer( ) {
94
+ assertDispatchQueue ( DispatchQueue . main)
95
+
92
96
//Ignore if we're not running
93
97
guard isActive else { return }
94
98
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ class DataProxyTCP: DataProxy {
31
31
}
32
32
33
33
func startServer( ) {
34
+ assertDispatchQueue ( DispatchQueue . main)
35
+
34
36
//Ignore if the server is already running
35
37
guard !serverRunning else { return }
36
38
@@ -171,6 +173,8 @@ class DataProxyTCP: DataProxy {
171
173
}
172
174
173
175
func stopServer( ) {
176
+ assertDispatchQueue ( DispatchQueue . main)
177
+
174
178
//Ignore if the server isn't running
175
179
guard serverRunning else { return }
176
180
serverRunning = false
You can’t perform that action at this time.
0 commit comments