Clients deconnected on server reload


#1

Hi, in dev mode, each time I save something that impacts the server and it builds / restarts, my client is logged out. That is really annoying in development. I don’t remember that behaviour before 1.4.2.

Any hint ?


#2

It should not do that normally.

Had this issue before because we used a fixture which created a test user. Every time it created that user it got logged out because the sessions were removed from the database.


#3

Oh nice, you solved my problem. Here was the faulty code :

if ( Meteor.users.findOne( {
		username: 'testUser'
	} ) )
	Accounts.setPassword( Meteor.users.findOne( {
		username: 'testUser'
	} )._id, 'test' );

It really does not look like something that should break anything…

Thank you :blush:


#4

Yup, did the same thing! Only way is to check whether the password was actually changed (by trying to login).


#5

I think I understand why it logs you out. Since the stored bcrypt is salted, it changes even if you keep the same actual password.

But that should not end your session :frowning:


#6

You can disable the logout: