We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d22783d commit 62a3111Copy full SHA for 62a3111
pc/user.cpp
@@ -2,6 +2,7 @@
2
#include "manager.hpp"
3
#include "log.hpp"
4
#include "mem_map.hpp"
5
+#include <algorithm>
6
7
#define PC_JSON_RPC_VER "2.0"
8
#define PC_JSON_PARSE_ERROR -32700
@@ -207,7 +208,9 @@ void user::parse_upd_price( uint32_t tok, uint32_t itok )
207
208
209
// Add the updated price to the pending updates
210
sptr->update_no_send( price, conf, stype, false );
- pending_vec_.emplace_back( sptr );
211
+ if( std::find(pending_vec_.begin(), pending_vec_.end(), sptr) == pending_vec_.end() ) {
212
+ pending_vec_.emplace_back( sptr );
213
+ }
214
215
// Send the result back
216
add_header();
0 commit comments