server shouldn't crash when a user connects with no nick

master
Jordan Orelli 10 years ago
parent 5c131aabd2
commit 56bdc5e6b0

@ -72,7 +72,7 @@ func (s *serverConnection) handleAuthRequest(requestId int, body json.RawMessage
s.key = auth.Key
// s.sendMeta("hello, %s", auth.Nick)
if err := s.openDB(); err != nil {
error_log.Printf("failed to open database: %v", err)
return fmt.Errorf("failed to open user database: %v", err)
}
b, err := s.db.Get([]byte("public_key"), nil)
switch err {

@ -8,7 +8,7 @@ import (
"os"
)
const keyLength = 4096
const keyLength = 2048
var (
info_log *log.Logger

Loading…
Cancel
Save