Close websocket connection upon join failure (#458)
* Close websocket connection on join failure to avoid hang * fix auto creation bug
This commit is contained in:
@@ -151,8 +151,10 @@ func (s *RTCService) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
_, err := s.store.LoadRoom(context.Background(), roomName)
|
||||
if err == ErrRoomNotFound {
|
||||
handleError(w, 404, err.Error())
|
||||
return
|
||||
} else if err != nil {
|
||||
handleError(w, 500, err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user