Explorar o código

Merge pull request #491 from cookkkie/patch-1

Drop the default gorilla websocket close handler
Skippy %!s(int64=6) %!d(string=hai) anos
pai
achega
70fa40c872
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      wsapi.go

+ 4 - 0
wsapi.go

@@ -85,6 +85,10 @@ func (s *Session) Open() error {
 		s.wsConn = nil // Just to be safe.
 		return err
 	}
+	
+	s.wsConn.SetCloseHandler(func(code int, text string) error {
+		return nil
+	})
 
 	defer func() {
 		// because of this, all code below must set err to the error