@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $event = new ReadEvent( |
114 | 114 | $executor, |
115 | 115 | $socket, |
116 | - $meta[ RequestExecutorInterface::META_USER_CONTEXT ], |
|
116 | + $meta[RequestExecutorInterface::META_USER_CONTEXT], |
|
117 | 117 | $frame, |
118 | 118 | true |
119 | 119 | ); |
@@ -140,8 +140,7 @@ discard block |
||
140 | 140 | if (!$counter) { |
141 | 141 | $meta = $descriptor->getMetadata(); |
142 | 142 | $counter = new SpeedRateCounter($minRate, $duration); |
143 | - $time = $meta[RequestExecutorInterface::META_LAST_IO_START_TIME] ?: |
|
144 | - $meta[RequestExecutorInterface::META_CONNECTION_FINISH_TIME]; |
|
143 | + $time = $meta[RequestExecutorInterface::META_LAST_IO_START_TIME] ?: $meta[RequestExecutorInterface::META_CONNECTION_FINISH_TIME]; |
|
145 | 144 | $counter->advance($time, 0); |
146 | 145 | $descriptor->registerCounter($name, $counter); |
147 | 146 | } |
@@ -165,16 +164,16 @@ discard block |
||
165 | 164 | $map = [ |
166 | 165 | RequestDescriptor::COUNTER_RECV_MIN_RATE => [ |
167 | 166 | 'resetCounter' => RequestDescriptor::COUNTER_SEND_MIN_RATE, |
168 | - 'minSpeed' => $meta[ RequestExecutorInterface::META_MIN_RECEIVE_SPEED ], |
|
169 | - 'duration' => $meta[ RequestExecutorInterface::META_MIN_RECEIVE_SPEED_DURATION ], |
|
167 | + 'minSpeed' => $meta[RequestExecutorInterface::META_MIN_RECEIVE_SPEED], |
|
168 | + 'duration' => $meta[RequestExecutorInterface::META_MIN_RECEIVE_SPEED_DURATION], |
|
170 | 169 | 'bytesCounter' => RequestExecutorInterface::META_BYTES_RECEIVED, |
171 | 170 | 'speedCounter' => RequestExecutorInterface::META_RECEIVE_SPEED, |
172 | 171 | 'exception' => ['AsyncSockets\Exception\SlowSpeedTransferException', 'tooSlowDataReceiving'], |
173 | 172 | ], |
174 | 173 | RequestDescriptor::COUNTER_SEND_MIN_RATE => [ |
175 | 174 | 'resetCounter' => RequestDescriptor::COUNTER_RECV_MIN_RATE, |
176 | - 'minSpeed' => $meta[ RequestExecutorInterface::META_MIN_SEND_SPEED ], |
|
177 | - 'duration' => $meta[ RequestExecutorInterface::META_MIN_SEND_SPEED_DURATION ], |
|
175 | + 'minSpeed' => $meta[RequestExecutorInterface::META_MIN_SEND_SPEED], |
|
176 | + 'duration' => $meta[RequestExecutorInterface::META_MIN_SEND_SPEED_DURATION], |
|
178 | 177 | 'bytesCounter' => RequestExecutorInterface::META_BYTES_SENT, |
179 | 178 | 'speedCounter' => RequestExecutorInterface::META_SEND_SPEED, |
180 | 179 | 'exception' => ['AsyncSockets\Exception\SlowSpeedTransferException', 'tooSlowDataSending'], |
@@ -182,7 +181,7 @@ discard block |
||
182 | 181 | ]; |
183 | 182 | |
184 | 183 | if (!isset($map[$name])) { |
185 | - throw new \LogicException('Can not process counter ' . $name . ' in transfer operation'); |
|
184 | + throw new \LogicException('Can not process counter '.$name.' in transfer operation'); |
|
186 | 185 | } |
187 | 186 | |
188 | 187 | $info = $map[$name]; |