mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
Handle non-WS connections in WS handler with no panic
Former-commit-id: f56665ee444bd16258edf6a34606efc132eced5a
This commit is contained in:
parent
c746d631d7
commit
6c9e3c69ff
|
@ -147,6 +147,9 @@ func New(cfg Config) *Server {
|
||||||
func (s *Server) Handler() context.Handler {
|
func (s *Server) Handler() context.Handler {
|
||||||
return func(ctx context.Context) {
|
return func(ctx context.Context) {
|
||||||
c := s.Upgrade(ctx)
|
c := s.Upgrade(ctx)
|
||||||
|
if c.Err() != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
// NOTE TO ME: fire these first BEFORE startReader and startPinger
|
// NOTE TO ME: fire these first BEFORE startReader and startPinger
|
||||||
// in order to set the events and any messages to send
|
// in order to set the events and any messages to send
|
||||||
// the startPinger will send the OK to the client and only
|
// the startPinger will send the OK to the client and only
|
||||||
|
|
Loading…
Reference in New Issue
Block a user