Remove more debugging

This commit is contained in:
Justin Hawkins 2024-06-27 20:35:18 +09:30
parent 0a9246c94d
commit e3ab2517f7

View File

@ -156,7 +156,7 @@ func (conn *Connection) Send(e any) error {
} }
func (conn *Connection) handle(event any) { func (conn *Connection) handle(event any) {
conn.logger.Debug(fmt.Sprintf("handle: incoming a %T", event)) // conn.logger.Debug(fmt.Sprintf("handle: incoming a %T", event))
argType := reflect.TypeOf(event) argType := reflect.TypeOf(event)
handler, ok := conn.handlers[argType] handler, ok := conn.handlers[argType]
if !ok { if !ok {
@ -166,10 +166,10 @@ func (conn *Connection) handle(event any) {
conn.logger.Debug(fmt.Sprintf("handle: found handler function for type %s", argType)) conn.logger.Debug(fmt.Sprintf("handle: found handler function for type %s", argType))
v := []reflect.Value{reflect.ValueOf(event)} v := []reflect.Value{reflect.ValueOf(event)}
conn.logger.Debug(fmt.Sprintf("handle: handler func: %+v", handler)) // conn.logger.Debug(fmt.Sprintf("handle: handler func: %+v", handler))
conn.logger.Debug(fmt.Sprintf("handle: handler var: %+v", v)) // conn.logger.Debug(fmt.Sprintf("handle: handler var: %+v", v))
conn.logger.Debug("handle: calling handler function") // conn.logger.Debug("handle: calling handler function")
handler.Call(v) handler.Call(v)
} }