codestates / codestates/NERDchat
[Error Handling] socket.io에서 namespace를 사용할때 use 함수가 작동이 안됐던 에러
Open
Error
Server
- Dominant language
- No language data
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
## 어떤 에러인가요?
```
io.use(controller.socket.useToken)
io.of(/^\/\d+$/).on('connection', controller.socket.socket);
```
위 코드에서 useToken 모듈이 작동하지 않았던 오류
## 에러 핸들링 방법
io.of(/^\/\d+$/).use(controller.socket.useToken).on('connection', controller.socket.socket);
Namespace안에서 use를 적용해야했다.
## 에러 핸들링을 위해 참고한 레퍼런스 링크
[Link](https://github.com/socketio/socket.io/issues/3082)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.