mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-22 04:25:13 +00:00
fix(backend): 無制限にストリーミングのチャンネルに接続できる問題を修正
This commit is contained in:
parent
571566d476
commit
d3cdc08802
2 changed files with 7 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
- Fix: ActivityPubのエンティティタイプ判定で不明なタイプを受け取った場合でも処理を継続するように
|
||||
- キュー処理のつまりが改善される可能性があります
|
||||
- Fix: リバーシの対局設定の変更が反映されないのを修正
|
||||
- Fix: 無制限にストリーミングのチャンネルに接続できる問題を修正
|
||||
|
||||
## 2024.7.0
|
||||
|
||||
|
|
|
@ -20,6 +20,8 @@ import type { ChannelsService } from './ChannelsService.js';
|
|||
import type { EventEmitter } from 'events';
|
||||
import type Channel from './channel.js';
|
||||
|
||||
const MAX_CHANNELS_PER_CONNECTION = 32;
|
||||
|
||||
/**
|
||||
* Main stream connection
|
||||
*/
|
||||
|
@ -255,6 +257,10 @@ export default class Connection {
|
|||
*/
|
||||
@bindThis
|
||||
public connectChannel(id: string, params: JsonObject | undefined, channel: string, pong = false) {
|
||||
if (this.channels.length >= MAX_CHANNELS_PER_CONNECTION) {
|
||||
return;
|
||||
}
|
||||
|
||||
const channelService = this.channelsService.getChannelService(channel);
|
||||
|
||||
if (channelService.requireCredential && this.user == null) {
|
||||
|
|
Loading…
Reference in a new issue