Преглед на файлове

Drop the default websocket close handler

Anis B преди 7 години
родител
ревизия
4523c46927
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  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