Manos Chorianopoulos

fix db crash

......@@ -4584,6 +4584,9 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
[self createDBIfNeeded];
[self initDBIfNeeded];
[self restore];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
// NSString *accessToken = [NSString alloc];
......@@ -4740,6 +4743,9 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
[self createDBIfNeeded];
[self initDBIfNeeded];
[self restore];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
// NSString *accessToken = [NSString alloc];
......