File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -124,13 +124,6 @@ public final class RPCChannel {
124124 }
125125 }
126126
127- var identifier : RPCID ?
128- if !isNotificationRequest {
129- let nextIdentifier = nextIdentifier ( )
130- identifier = nextIdentifier
131- payload [ " id " ] = nextIdentifier. jsonValue
132- }
133-
134127 guard JSONSerialization . isValidJSONObject ( payload) else {
135128 completion ? ( . failure( SoraError . rpcEncodingError ( reason: " invalid JSON payload " ) ) )
136129 return false
@@ -144,6 +137,13 @@ public final class RPCChannel {
144137 return false
145138 }
146139
140+ var identifier : RPCID ?
141+ if !isNotificationRequest {
142+ let nextIdentifier = nextIdentifier ( )
143+ identifier = nextIdentifier
144+ payload [ " id " ] = nextIdentifier. jsonValue
145+ }
146+
147147 var pending : Pending ?
148148 if !isNotificationRequest, let identifier {
149149 // タイムアウト時に実行されるタスク
You can’t perform that action at this time.
0 commit comments